/system/hardware/interfaces/suspend/1.0/default/ |
D | SystemSuspend.h | 41 using ::android::base::unique_fd; 78 SystemSuspend(unique_fd wakeupCountFd, unique_fd stateFd, unique_fd suspendStatsFd, 79 size_t maxStatsEntries, unique_fd kernelWakelockStatsFd, 80 unique_fd wakeupReasonsFd, unique_fd suspendTimeFd, 99 unique_fd reopenFileUsingFd(const int fd, int permission); 123 unique_fd mWakeupCountFd; 124 unique_fd mStateFd; 126 unique_fd mSuspendStatsFd; 127 unique_fd mSuspendTimeFd; 150 unique_fd mWakeLockFd; [all …]
|
D | main.cpp | 44 using android::base::unique_fd; 74 unique_fd wakeupCountFd{TEMP_FAILURE_RETRY(open(kSysPowerWakeupCount, O_CLOEXEC | O_RDWR))}; in main() 78 unique_fd stateFd{TEMP_FAILURE_RETRY(open(kSysPowerState, O_CLOEXEC | O_RDWR))}; in main() 82 unique_fd kernelWakelockStatsFd{ in main() 87 unique_fd suspendStatsFd{ in main() 92 unique_fd wakeupReasonsFd{ in main() 97 unique_fd suspendTimeFd{TEMP_FAILURE_RETRY(open(kSysKernelSuspendTime, O_CLOEXEC | O_RDONLY))}; in main()
|
/system/tools/aidl/tests/ |
D | aidl_test_client_file_descriptors.cpp | 30 using android::base::unique_fd; 37 void DoPipe(unique_fd* read_side, unique_fd* write_side) { in DoPipe() 46 void WriteStringToFd(const std::string& str, const unique_fd& fd) { in WriteStringToFd() 53 void ReadFdToStringAndCompare(const unique_fd& fd, const std::string& str) { in ReadFdToStringAndCompare() 68 unique_fd read_fd; in TEST_F() 69 unique_fd write_fd; in TEST_F() 72 unique_fd return_fd; in TEST_F() 87 std::vector<unique_fd> array; in TEST_F() 91 std::vector<unique_fd> repeated; in TEST_F() 97 repeated = std::vector<unique_fd>(array.size()); in TEST_F() [all …]
|
/system/core/fs_mgr/libdm/ |
D | loop_control_test.cpp | 33 using unique_fd = android::base::unique_fd; typedef 35 static unique_fd TempFile() { in TempFile() 38 unique_fd fd(CreateTempFile("temp", 0)); in TempFile() 53 unique_fd fd = TempFile(); in TEST() 60 unique_fd loop_fd(open(loop.device().c_str(), O_RDWR)); in TEST()
|
D | test_util.cpp | 29 using unique_fd = android::base::unique_fd; typedef 33 unique_fd CreateTempFile(const std::string& name, size_t size) { in CreateTempFile() 34 unique_fd fd(syscall(__NR_memfd_create, name.c_str(), MFD_ALLOW_SEALING)); in CreateTempFile()
|
/system/core/debuggerd/tombstoned/include/tombstoned/ |
D | tombstoned.h | 25 bool tombstoned_connect(pid_t pid, android::base::unique_fd* tombstoned_socket, 26 android::base::unique_fd* text_output_fd, 27 android::base::unique_fd* proto_output_fd, DebuggerdDumpType dump_type); 29 bool tombstoned_connect(pid_t pid, android::base::unique_fd* tombstoned_socket, 30 android::base::unique_fd* text_output_fd, DebuggerdDumpType dump_type);
|
/system/libbase/ |
D | cmsg_test.cpp | 28 using android::base::unique_fd; 57 unique_fd send; 58 unique_fd recv; 63 unique_fd fd1; 64 unique_fd fd2; 74 unique_fd received; in TEST_P() 86 unique_fd received1, received2; in TEST_P() 108 unique_fd received; in TEST_P() 121 unique_fd received; in TEST_P() 139 std::vector<unique_fd> received1; in TEST_P() [all …]
|
/system/core/debuggerd/tombstoned/ |
D | tombstoned_client.cpp | 33 using android::base::unique_fd; 35 bool tombstoned_connect(pid_t pid, unique_fd* tombstoned_socket, unique_fd* text_output_fd, in tombstoned_connect() 40 bool tombstoned_connect(pid_t pid, unique_fd* tombstoned_socket, unique_fd* text_output_fd, in tombstoned_connect() 41 unique_fd* proto_output_fd, DebuggerdDumpType dump_type) { in tombstoned_connect() 42 unique_fd sockfd( in tombstoned_connect() 62 unique_fd tmp_output_fd, tmp_proto_fd; in tombstoned_connect()
|
D | intercept_manager.h | 39 android::base::unique_fd sockfd; 42 android::base::unique_fd output_fd; 56 bool GetIntercept(pid_t pid, DebuggerdDumpType dump_type, android::base::unique_fd* out_fd);
|
/system/core/debuggerd/ |
D | tombstone_handler.cpp | 28 using android::base::unique_fd; 40 static bool connect_tombstone_server_microdroid(unique_fd* text_output_fd, in connect_tombstone_server_microdroid() 41 unique_fd* proto_output_fd, in connect_tombstone_server_microdroid() 69 unique_fd vsock_output_fd(fd1), vsock_proto_fd(fd2); in connect_tombstone_server_microdroid() 100 bool connect_tombstone_server(pid_t pid, unique_fd* tombstoned_socket, unique_fd* text_output_fd, in connect_tombstone_server() 101 unique_fd* proto_output_fd, DebuggerdDumpType dump_type) { in connect_tombstone_server()
|
D | tombstone_handler.h | 20 bool connect_tombstone_server(pid_t pid, android::base::unique_fd* tombstoned_socket, 21 android::base::unique_fd* text_output_fd, 22 android::base::unique_fd* proto_output_fd,
|
D | debuggerd_test.cpp | 78 using android::base::unique_fd; 116 static void tombstoned_intercept(pid_t target_pid, unique_fd* intercept_fd, unique_fd* output_fd, in tombstoned_intercept() 129 unique_fd output_pipe_write; in tombstoned_intercept() 184 unique_fd crasher_pipe; 185 unique_fd intercept_fd; 190 void StartIntercept(unique_fd* output_fd, DebuggerdDumpType intercept_type = kDebuggerdTombstone); 223 void CrasherTest::StartIntercept(unique_fd* output_fd, DebuggerdDumpType intercept_type) { in StartIntercept() 250 unique_fd read_pipe; in StartProcess() 251 unique_fd crasher_read_pipe; in StartProcess() 302 static void ConsumeFd(unique_fd fd, std::string* output) { in ConsumeFd() [all …]
|
/system/core/libsysutils/src/ |
D | SocketListener_test.cpp | 35 using android::base::unique_fd; 46 unique_fd serverSocket(const std::string& path) { in serverSocket() 49 unique_fd fd(socket(PF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0)); in serverSocket() 62 unique_fd clientSocket(const std::string& path) { in clientSocket() 63 unique_fd fd(socket(PF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0)); in clientSocket() 140 unique_fd client_fd = clientSocket(mSocketPath); in testCommand() 149 unique_fd mSserverFd; 176 unique_fd client1 = clientSocket(mSocketPath); in TEST_F() 177 unique_fd client2 = clientSocket(mSocketPath); in TEST_F()
|
/system/netd/client/ |
D | NetdClientTest.cpp | 64 android::base::unique_fd ipv4(socketFuncPtr(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0)), in expectAllowNetworkingForProcess() 70 android::base::unique_fd dnsproxydSocket(openDnsProxyFuncPtr()); in expectAllowNetworkingForProcess() 76 android::base::unique_fd unixSocket(socketFuncPtr(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0)); in expectNotAllowNetworkingForProcess() 78 android::base::unique_fd ipv4(socketFuncPtr(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0)); in expectNotAllowNetworkingForProcess() 81 android::base::unique_fd ipv6(socketFuncPtr(AF_INET6, SOCK_STREAM | SOCK_CLOEXEC, 0)); in expectNotAllowNetworkingForProcess() 86 android::base::unique_fd dnsproxydSocket(openDnsProxyFuncPtr()); in expectNotAllowNetworkingForProcess() 100 android::base::unique_fd clientFd, serverFd; in TEST()
|
/system/libbase/tidy/ |
D | unique_fd_test.cpp | 23 extern void consume_unique_fd(android::base::unique_fd fd); 25 TEST(unique_fd, bugprone_use_after_move) { in TEST() argument 27 android::base::unique_fd ufd(open("/dev/null", O_RDONLY | O_CLOEXEC)); in TEST()
|
/system/netd/tests/ |
D | netd_client_test.cpp | 38 android::base::unique_fd sock(socket(AF_INET6, SOCK_DGRAM | SOCK_CLOEXEC, IPPROTO_UDP)); in checkNetworkConnectivity() 58 android::base::unique_fd ipv4(socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0)), in expectHasNetworking() 77 android::base::unique_fd unixSocket(socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0)); in expectNoNetworking() 79 android::base::unique_fd ipv4(socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0)); in expectNoNetworking() 82 android::base::unique_fd ipv6(socket(AF_INET6, SOCK_STREAM | SOCK_CLOEXEC, 0)); in expectNoNetworking()
|
/system/core/fs_mgr/tests/ |
D | file_wait_test.cpp | 25 using android::base::unique_fd; 43 unique_fd fd(open(test_file_.c_str(), O_CREAT | O_TRUNC | O_RDWR, 0700)); in TEST_F() 58 unique_fd fd(open(test_file_.c_str(), O_CREAT | O_TRUNC | O_RDWR, 0700)); in TEST_F() 67 unique_fd fd(open(test_file_.c_str(), O_CREAT | O_TRUNC | O_RDWR, 0700)); in TEST_F() 76 unique_fd fd(open(test_file_.c_str(), O_CREAT | O_TRUNC | O_RDWR, 0700)); in TEST_F()
|
/system/core/fastboot/ |
D | super_flash_helper_test.cpp | 26 using android::base::unique_fd; 28 unique_fd OpenTestFile(const std::string& file, int flags) { in OpenTestFile() 31 unique_fd fd(open(path.c_str(), flags)); in OpenTestFile() 37 return unique_fd{open(path.c_str(), flags)}; in OpenTestFile() 46 unique_fd OpenFile(const std::string& name) const override { in OpenFile()
|
/system/memory/libmeminfo/ |
D | pageacct.cpp | 26 using unique_fd = ::android::base::unique_fd; typedef 47 unique_fd count_fd(TEMP_FAILURE_RETRY(open("/proc/kpagecount", O_RDONLY | O_CLOEXEC))); in InitPageAcct() 56 unique_fd flags_fd(TEMP_FAILURE_RETRY(open("/proc/kpageflags", O_RDONLY | O_CLOEXEC))); in InitPageAcct() 65 unique_fd idle_fd( in InitPageAcct()
|
/system/core/libcutils/ |
D | ashmem_test.cpp | 30 using android::base::unique_fd; 32 void TestCreateRegion(size_t size, unique_fd &fd, int prot) { in TestCreateRegion() 33 fd = unique_fd(ashmem_create_region(nullptr, size)); in TestCreateRegion() 45 void TestMmap(const unique_fd& fd, size_t size, int prot, void** region, off_t off = 0) { in TestMmap() 52 void TestProtDenied(const unique_fd &fd, size_t size, int prot) { in TestProtDenied() 58 void TestProtIs(const unique_fd& fd, int prot) { in TestProtIs() 75 unique_fd fd; in TEST() 97 unique_fd fd; in TEST() 133 unique_fd fd; in TEST() 191 unique_fd fd; in TEST() [all …]
|
/system/libbase/include/android-base/ |
D | cmsg.h | 62 std::vector<android::base::unique_fd>* fds); 83 std::vector<unique_fd*> fds; in ReceiveFileDescriptors() 86 std::vector<unique_fd> result; in ReceiveFileDescriptors() 90 for (unique_fd* fd : fds) { in ReceiveFileDescriptors()
|
/system/core/fs_mgr/liblp/ |
D | test_partition_opener.cpp | 24 using android::base::unique_fd; 31 unique_fd TestPartitionOpener::Open(const std::string& partition_name, int flags) const { in Open() 37 return unique_fd{dup(iter->second)}; in Open()
|
D | io_test.cpp | 43 using unique_fd = android::base::unique_fd; typedef 55 static unique_fd CreateFakeDisk(off_t size) { in CreateFakeDisk() 56 unique_fd fd(syscall(__NR_memfd_create, "fake_disk", MFD_ALLOW_SEALING)); in CreateFakeDisk() 81 static unique_fd CreateFakeDisk() { in CreateFakeDisk() 107 static unique_fd CreateFlashedDisk() { in CreateFlashedDisk() 112 unique_fd fd = CreateFakeDisk(); in CreateFlashedDisk() 131 unique_fd fd = CreateFakeDisk(); in TEST_F() 154 unique_fd fd = CreateFakeDisk(); in TEST_F() 168 unique_fd fd = CreateFakeDisk(); in TEST_F() 214 unique_fd fd = CreateFlashedDisk(); in TEST_F() [all …]
|
/system/core/fastboot/device/ |
D | usb.h | 54 android::base::unique_fd control; 55 android::base::unique_fd bulk_out; // "out" from the host's perspective => source for adbd 56 android::base::unique_fd bulk_in; // "in" from the host's perspective => sink for adbd
|
/system/vold/ |
D | Loop.cpp | 49 using android::base::unique_fd; 55 unique_fd ctl_fd(open("/dev/loop-control", O_RDWR | O_CLOEXEC)); in create() 69 unique_fd target_fd; in create() 85 unique_fd device_fd(open(out_device.c_str(), O_RDWR | O_CLOEXEC)); in create() 143 unique_fd fd(open(path.c_str(), O_RDWR | O_CLOEXEC)); in destroyAll() 173 unique_fd fd(open(file, O_CREAT | O_WRONLY | O_TRUNC | O_CLOEXEC, 0600)); in createImageFile()
|