Home
last modified time | relevance | path

Searched refs:UniqueFd (Results 1 – 17 of 17) sorted by relevance

/system/netd/libnetdutils/include/netdutils/
DUniqueFd.h36 class UniqueFd {
38 UniqueFd() = default;
40 UniqueFd(Fd fd) : mFd(fd) {} in UniqueFd() function
42 ~UniqueFd() { reset(); } in ~UniqueFd()
45 UniqueFd(const UniqueFd&) = delete;
46 UniqueFd& operator=(const UniqueFd&) = delete;
49 UniqueFd(UniqueFd&& other) { std::swap(mFd, other.mFd); } in UniqueFd() function
50 UniqueFd& operator=(UniqueFd&& other) {
66 std::ostream& operator<<(std::ostream& os, const UniqueFd& fd);
DMockSyscalls.h37 StatusOr<UniqueFd>(const std::string& pathname, int flags, mode_t mode));
38 MOCK_CONST_METHOD3(socket, StatusOr<UniqueFd>(int domain, int type, int protocol));
50 MOCK_CONST_METHOD2(eventfd, StatusOr<UniqueFd>(unsigned int initval, int flags));
DSyscalls.h45 virtual StatusOr<UniqueFd> open(const std::string& pathname, int flags,
48 virtual StatusOr<UniqueFd> socket(int domain, int type, int protocol) const = 0;
64 virtual StatusOr<UniqueFd> eventfd(unsigned int initval, int flags) const = 0;
/system/netd/libnetdutils/
DFdTest.cpp34 inline Fd toFd(const UniqueFd& fd) { in toFd()
74 UniqueFd u(97); in TEST_F()
84 UniqueFd u(98); in TEST_F()
92 UniqueFd u(99); in TEST_F()
102 UniqueFd u1(kFd); in TEST_F()
104 UniqueFd u2(std::move(u1)); in TEST_F()
116 UniqueFd u1(kFd); in TEST_F()
118 UniqueFd u2 = std::move(u1); in TEST_F()
122 UniqueFd u3; in TEST_F()
135 const UniqueFd u(kFd); in TEST_F()
[all …]
DUniqueFd.cpp25 void UniqueFd::reset(Fd fd) { in reset()
33 std::ostream& operator<<(std::ostream& os, const UniqueFd& fd) { in operator <<()
DSyscalls.cpp44 StatusOr<UniqueFd> open(const std::string& pathname, int flags, mode_t mode) const override { in open()
45 UniqueFd fd(::open(pathname.c_str(), flags, mode)); in open()
52 StatusOr<UniqueFd> socket(int domain, int type, int protocol) const override { in socket()
53 UniqueFd sock(::socket(domain, type, protocol)); in socket()
110 StatusOr<UniqueFd> eventfd(unsigned int initval, int flags) const override { in eventfd()
111 UniqueFd fd(::eventfd(initval, flags)); in eventfd()
DAndroid.bp24 "UniqueFd.cpp",
DSyscallsTest.cpp62 EXPECT_CALL(mSyscalls, open(kPath, kFlags, kMode)).WillOnce(Return(ByMove(UniqueFd(kFd)))); in TEST_F()
/system/netd/server/
DNetlinkListener.h78 NetlinkListener(netdutils::UniqueFd event, netdutils::UniqueFd sock, const std::string& name);
93 const netdutils::UniqueFd mEvent;
94 const netdutils::UniqueFd mSock;
DNetlinkListener.cpp36 using netdutils::UniqueFd;
60 NetlinkListener::NetlinkListener(UniqueFd event, UniqueFd sock, const std::string& name) in NetlinkListener()
DProcess.cpp47 using netdutils::UniqueFd;
101 const UniqueFd autoClosePidFile(pidFd); in writePidFile()
DInterfaceControllerTest.cpp43 using netdutils::UniqueFd;
70 EXPECT_CALL(mSyscalls, open(path, _, _)).WillOnce(Return(ByMove(UniqueFd(fd)))); in expectOpenFile()
/system/incremental_delivery/incfs/include/
Dincfs.h62 class UniqueFd {
64 explicit UniqueFd(int fd) : fd_(fd) {} in UniqueFd() function
65 UniqueFd() : UniqueFd(-1) {} in UniqueFd() function
66 ~UniqueFd() { close(); } in ~UniqueFd()
67 UniqueFd(UniqueFd&& other) noexcept : fd_(other.release()) {} in UniqueFd() function
68 UniqueFd& operator=(UniqueFd&& other) noexcept {
109 using Fds = std::array<UniqueFd, IncFsFdType::FDS_COUNT>;
251 UniqueFd openForSpecialOps(const Control& control, FileId fileId);
252 UniqueFd openForSpecialOps(const Control& control, std::string_view path);
Dincfs_inline.h128 result[i] = UniqueFd(fds[i]); in releaseFds()
288 inline UniqueFd openForSpecialOps(const Control& control, FileId fileId) { in openForSpecialOps()
289 return UniqueFd(IncFs_OpenForSpecialOpsById(control, fileId)); in openForSpecialOps()
291 inline UniqueFd openForSpecialOps(const Control& control, std::string_view path) { in openForSpecialOps()
292 return UniqueFd(IncFs_OpenForSpecialOpsByPath(control, details::c_str(path))); in openForSpecialOps()
/system/incremental_delivery/libdataloader/include/
Ddataloader_inline.h130 inline android::incfs::UniqueFd FilesystemConnector::openForSpecialOps(FileId fid) { in openForSpecialOps()
131 return android::incfs::UniqueFd(DataLoader_FilesystemConnector_openForSpecialOps(this, fid)); in openForSpecialOps()
Ddataloader.h120 android::incfs::UniqueFd openForSpecialOps(FileId fid);
/system/incremental_delivery/libdataloader/
DDataLoaderConnector.cpp499 android::incfs::UniqueFd openForSpecialOps(FileId fid) const { in openForSpecialOps()