Home
last modified time | relevance | path

Searched refs:ScopedFD (Results 1 – 25 of 86) sorted by relevance

1234

/external/libbrillo/brillo/
Dfile_utils.cc75 base::ScopedFD scoped_fd(HANDLE_EINTR(openat( in RegularFileOrDelete()
110 base::ScopedFD* fd_out) { in TouchFileInternal()
128 base::ScopedFD scoped_fd(HANDLE_EINTR(openat( in TouchFileInternal()
160 base::ScopedFD OpenPathComponentInternal(int parent_fd, in OpenPathComponentInternal()
165 base::ScopedFD fd; in OpenPathComponentInternal()
189 return base::ScopedFD(); in OpenPathComponentInternal()
197 return base::ScopedFD(); in OpenPathComponentInternal()
201 return base::ScopedFD(); in OpenPathComponentInternal()
208 base::ScopedFD OpenSafelyInternal(int parent_fd, in OpenSafelyInternal()
218 return base::ScopedFD(); // This is an invalid fd. in OpenSafelyInternal()
[all …]
Dfile_utils.h48 BRILLO_EXPORT base::ScopedFD OpenSafely(const base::FilePath& path,
64 BRILLO_EXPORT base::ScopedFD OpenAtSafely(int parent_fd,
79 BRILLO_EXPORT base::ScopedFD OpenFifoSafely(const base::FilePath& path,
90 BRILLO_EXPORT base::ScopedFD MkdirRecursively(const base::FilePath& full_path,
Dscoped_mount_namespace.cc24 ScopedMountNamespace::ScopedMountNamespace(base::ScopedFD mount_namespace_fd) in ScopedMountNamespace()
42 base::ScopedFD original_mount_namespace_fd( in CreateFromPath()
50 base::ScopedFD mount_namespace_fd( in CreateFromPath()
/external/rust/crates/quiche/deps/boringssl/src/tool/
Dinternal.h46 class ScopedFD {
48 ScopedFD() {} in ScopedFD() function
49 explicit ScopedFD(int fd) : fd_(fd) {} in ScopedFD() function
50 ScopedFD(ScopedFD &&other) { *this = std::move(other); } in ScopedFD() function
51 ScopedFD(const ScopedFD &) = delete;
52 ~ScopedFD() { reset(); } in ~ScopedFD()
54 ScopedFD &operator=(const ScopedFD &) = delete;
55 ScopedFD &operator=(ScopedFD &&other) {
84 ScopedFD OpenFD(const char *path, int flags);
99 ScopedFILE FDToFILE(ScopedFD fd, const char *mode);
Dfd.cc33 ScopedFD OpenFD(const char *path, int flags) { in OpenFD()
35 return ScopedFD(_open(path, flags)); in OpenFD()
41 return ScopedFD(fd); in OpenFD()
93 ScopedFILE FDToFILE(ScopedFD fd, const char *mode) { in FDToFILE()
Ddigest.cc72 static ScopedFD OpenFile(const std::string &filename) { in OpenFile()
73 ScopedFD fd = OpenFD(filename.c_str(), O_RDONLY | O_BINARY); in OpenFile()
77 return ScopedFD(); in OpenFile()
85 return ScopedFD(); in OpenFile()
90 return ScopedFD(); in OpenFile()
104 ScopedFD scoped_fd; in SumFile()
210 ScopedFD fd = OpenFile(source.filename()); in Check()
/external/boringssl/src/tool/
Dinternal.h46 class ScopedFD {
48 ScopedFD() {} in ScopedFD() function
49 explicit ScopedFD(int fd) : fd_(fd) {} in ScopedFD() function
50 ScopedFD(ScopedFD &&other) { *this = std::move(other); } in ScopedFD() function
51 ScopedFD(const ScopedFD &) = delete;
52 ~ScopedFD() { reset(); } in ~ScopedFD()
54 ScopedFD &operator=(const ScopedFD &) = delete;
55 ScopedFD &operator=(ScopedFD &&other) {
84 ScopedFD OpenFD(const char *path, int flags);
99 ScopedFILE FDToFILE(ScopedFD fd, const char *mode);
Dfd.cc33 ScopedFD OpenFD(const char *path, int flags) { in OpenFD()
35 return ScopedFD(_open(path, flags)); in OpenFD()
41 return ScopedFD(fd); in OpenFD()
93 ScopedFILE FDToFILE(ScopedFD fd, const char *mode) { in FDToFILE()
Ddigest.cc72 static ScopedFD OpenFile(const std::string &filename) { in OpenFile()
73 ScopedFD fd = OpenFD(filename.c_str(), O_RDONLY | O_BINARY); in OpenFile()
77 return ScopedFD(); in OpenFile()
85 return ScopedFD(); in OpenFile()
90 return ScopedFD(); in OpenFile()
104 ScopedFD scoped_fd; in SumFile()
210 ScopedFD fd = OpenFile(source.filename()); in Check()
/external/libchrome/base/posix/
Dunix_domain_socket_unittest.cc55 ScopedFD scoped_fd0(fds[0]); in TEST()
56 ScopedFD scoped_fd1(fds[1]); in TEST()
65 std::vector<ScopedFD> message_fds; in TEST()
90 ScopedFD scoped_fd1(fds[1]); in TEST()
107 ScopedFD recv_sock(fds[0]); in TEST()
108 ScopedFD send_sock(fds[1]); in TEST()
120 std::vector<ScopedFD> fd_vec; in TEST()
134 ScopedFD recv_sock(fds[0]); in TEST()
135 ScopedFD send_sock(fds[1]); in TEST()
149 std::vector<ScopedFD> recv_fds; in TEST()
[all …]
Dunix_domain_socket.h26 bool BASE_EXPORT CreateSocketPair(ScopedFD* one, ScopedFD* two);
53 std::vector<ScopedFD>* fds);
62 std::vector<ScopedFD>* fds,
105 std::vector<ScopedFD>* fds,
Dunix_domain_socket.cc32 bool CreateSocketPair(ScopedFD* one, ScopedFD* two) { in CreateSocketPair()
121 std::vector<ScopedFD>* fds) { in RecvMsg()
129 std::vector<ScopedFD>* fds, in RecvMsgWithPid()
139 std::vector<ScopedFD>* fds, in RecvMsgWithFlags()
205 fds->push_back(ScopedFD(wire_fds[i])); // TODO(mdempsky): emplace_back in RecvMsgWithFlags()
249 ScopedFD recv_sock, send_sock; in SendRecvMsgWithFlags()
265 std::vector<ScopedFD> recv_fds; in SendRecvMsgWithFlags()
/external/llvm/unittests/Support/
DReplaceFileTest.cpp44 class ScopedFD { class
47 ScopedFD(const ScopedFD &) = delete;
48 ScopedFD &operator=(const ScopedFD &) = delete;
51 explicit ScopedFD(int Descriptor) : FD(Descriptor) {} in ScopedFD() function in __anon34a2851d0111::ScopedFD
52 ~ScopedFD() { Process::SafelyCloseFileDescriptor(FD); } in ~ScopedFD()
75 ScopedFD EventuallyCloseIt(ReadFD); in TEST()
95 ScopedFD EventuallyCloseIt(ReadFD); in TEST()
/external/libchrome/base/
Dfile_descriptor_store.cc14 base::ScopedFD fd) in Descriptor()
21 base::ScopedFD fd, in Descriptor()
37 base::ScopedFD FileDescriptorStore::TakeFD( in TakeFD()
40 base::ScopedFD fd = MaybeTakeFD(key, region); in TakeFD()
46 base::ScopedFD FileDescriptorStore::MaybeTakeFD( in MaybeTakeFD()
51 return base::ScopedFD(); in MaybeTakeFD()
53 base::ScopedFD result = std::move(iter->second.fd); in MaybeTakeFD()
58 void FileDescriptorStore::Set(const std::string& key, base::ScopedFD fd) { in Set()
63 base::ScopedFD fd, in Set()
Dfile_descriptor_store.h23 Descriptor(const std::string& key, base::ScopedFD fd);
25 base::ScopedFD fd,
35 base::ScopedFD fd;
46 base::ScopedFD TakeFD(const std::string& key,
50 base::ScopedFD MaybeTakeFD(const std::string& key,
55 void Set(const std::string& key, base::ScopedFD fd);
59 base::ScopedFD fd,
/external/llvm-project/llvm/unittests/Support/
DReplaceFileTest.cpp43 class ScopedFD { class
46 ScopedFD(const ScopedFD &) = delete;
47 ScopedFD &operator=(const ScopedFD &) = delete;
50 explicit ScopedFD(int Descriptor) : FD(Descriptor) {} in ScopedFD() function in __anon5e5e6b4b0111::ScopedFD
51 ~ScopedFD() { Process::SafelyCloseFileDescriptor(FD); } in ~ScopedFD()
66 ScopedFD EventuallyCloseIt(FD); in FileHasContent()
90 ScopedFD EventuallyCloseIt(ReadFD); in TEST()
149 ScopedFD X(TargetFD); in TEST()
/external/libchrome/base/memory/
Dshared_memory_helper.h22 ScopedFD* fd,
23 ScopedFD* readonly_fd,
28 bool PrepareMapFile(ScopedFD fd,
29 ScopedFD readonly_fd,
Dplatform_shared_memory_region.h44 ScopedFDPair(ScopedFD in_fd, ScopedFD in_readonly_fd);
51 ScopedFD fd;
52 ScopedFD readonly_fd;
106 using ScopedPlatformHandle = ScopedFD;
Dplatform_shared_memory_region_android.cc35 ScopedFD fd, in Take()
68 ScopedFD duped_fd(HANDLE_EINTR(dup(handle_.get()))); in Duplicate()
84 ScopedFD handle_copy(handle_.release()); in ConvertToReadOnly()
158 ScopedFD fd(ashmem_create_region( in Create()
196 ScopedFD fd, in PlatformSharedMemoryRegion()
Dshared_memory_helper.cc33 ScopedFD* fd, in CreateAnonymousSharedMemory()
34 ScopedFD* readonly_fd, in CreateAnonymousSharedMemory()
69 bool PrepareMapFile(ScopedFD fd, in PrepareMapFile()
70 ScopedFD readonly_fd, in PrepareMapFile()
Dplatform_shared_memory_region_posix.cc63 ScopedFDPair::ScopedFDPair(ScopedFD in_fd, ScopedFD in_readonly_fd) in ScopedFDPair()
128 ScopedFD duped_fd(HANDLE_EINTR(dup(handle_.fd.get()))); in Duplicate()
134 return PlatformSharedMemoryRegion({std::move(duped_fd), ScopedFD()}, mode_, in Duplicate()
217 ScopedFD fd; in Create()
239 ScopedFD readonly_fd; in Create()
/external/libchrome/base/android/
Dscoped_hardware_buffer_handle.cc65 ScopedFD ScopedHardwareBufferHandle::SerializeAsFileDescriptor() const { in SerializeAsFileDescriptor()
68 ScopedFD reader, writer; in SerializeAsFileDescriptor()
71 return ScopedFD(); in SerializeAsFileDescriptor()
82 return ScopedFD(); in SerializeAsFileDescriptor()
90 ScopedHardwareBufferHandle::DeserializeFromFileDescriptor(ScopedFD fd) { in DeserializeFromFileDescriptor()
/external/libbrillo/brillo/dbus/
Dfile_descriptor.h29 FileDescriptor(base::ScopedFD&& other) : fd(std::move(other)) {} in FileDescriptor()
41 FileDescriptor& operator=(base::ScopedFD&& other) {
53 base::ScopedFD fd;
/external/libchrome/mojo/public/cpp/platform/
Dsocket_utils_posix.h52 const std::vector<base::ScopedFD>& descriptors);
59 std::vector<base::ScopedFD>* descriptors,
75 base::ScopedFD* connection_fd,
Dsocket_utils_posix.cc106 const std::vector<base::ScopedFD>& descriptors) { in SendmsgWithHandles()
132 std::vector<base::ScopedFD>* descriptors, in SocketRecvmsg()
160 base::ScopedFD fd(fds[i]); in SocketRecvmsg()
171 base::ScopedFD* connection_fd, in AcceptSocketConnection()
179 base::ScopedFD accepted_handle(HANDLE_EINTR(accept(server_fd, nullptr, 0))); in AcceptSocketConnection()

1234