Home
last modified time | relevance | path

Searched refs:out_fd (Results 1 – 9 of 9) sorted by relevance

/frameworks/native/cmds/dumpstate/
DDumpstateInternal.cpp134 int DumpFileFromFdToFd(const std::string& title, const std::string& path_string, int fd, int out_fd, in DumpFileFromFdToFd() argument
138 dprintf(out_fd, "------ %s (%s", title.c_str(), path); in DumpFileFromFdToFd()
149 dprintf(out_fd, ": %s", stamp); in DumpFileFromFdToFd()
151 dprintf(out_fd, ") ------\n"); in DumpFileFromFdToFd()
152 fsync(out_fd); in DumpFileFromFdToFd()
155 if (out_fd != STDOUT_FILENO) { in DumpFileFromFdToFd()
157 dprintf(out_fd, "%s: skipped on dry run\n", path); in DumpFileFromFdToFd()
159 dprintf(out_fd, "\t(skipped on dry run)\n"); in DumpFileFromFdToFd()
161 fsync(out_fd); in DumpFileFromFdToFd()
170 dprintf(out_fd, "*** %s: poll failed: %s\n", path, strerror(errno)); in DumpFileFromFdToFd()
[all …]
DDumpPool.cpp37 void WaitForTask(std::future<std::string> future, const std::string& title, int out_fd) { in WaitForTask() argument
44 DumpFileToFd(out_fd, title, result); in WaitForTask()
101 const std::string& duration_title, int out_fd) { in invokeTask() argument
103 /*verbose =*/false, out_fd); in invokeTask()
109 const std::string& duration_title, int out_fd) { in invokeTask() argument
111 /*verbose =*/false, out_fd); in invokeTask()
112 std::invoke(dump_func, out_fd); in invokeTask()
Ddumpstate.cpp142 bool verbose_duration = false, int out_fd = STDOUT_FILENO) { in RunCommand() argument
143 return ds.RunCommand(title, full_command, options, verbose_duration, out_fd); in RunCommand()
275 bool CopyFile(int in_fd, int out_fd) { in CopyFile() argument
279 if (!android::base::WriteFully(out_fd, buf, byte_count)) { in CopyFile()
286 static bool CopyFileToFd(const std::string& input_file, int out_fd) { in CopyFileToFd() argument
287 MYLOGD("Going to copy file (%s) to %d\n", input_file.c_str(), out_fd); in CopyFileToFd()
291 if (out_fd != -1 && in_fd.get() != -1) { in CopyFileToFd()
292 if (CopyFile(in_fd.get(), out_fd)) { in CopyFileToFd()
352 android::base::unique_fd out_fd(OpenForWrite(output_file)); in CopyFileToFile() local
353 return CopyFileToFd(input_file, out_fd.get()); in CopyFileToFile()
[all …]
DDumpPool.h41 void WaitForTask(std::future<std::string> future, const std::string& title, int out_fd);
152 template<class T> void invokeTask(T dump_func, const std::string& duration_title, int out_fd);
DDumpstateUtil.cpp249 int DumpFileToFd(int out_fd, const std::string& title, const std::string& path) { in DumpFileToFd() argument
254 dprintf(out_fd, "*** Error dumping %s: %s\n", path.c_str(), strerror(err)); in DumpFileToFd()
256 dprintf(out_fd, "*** Error dumping %s (%s): %s\n", path.c_str(), title.c_str(), in DumpFileToFd()
261 return DumpFileFromFdToFd(title, path, fd.get(), out_fd, PropertiesHelper::IsDryRun()); in DumpFileToFd()
DDumpstateInternal.h59 int DumpFileFromFdToFd(const std::string& title, const std::string& path_string, int fd, int out_fd,
Ddumpstate.h239 bool verbose_duration = false, int out_fd = STDOUT_FILENO);
257 long dumpsys_timeout_ms = 0, int out_fd = STDOUT_FILENO);
319 void DumpstateBoard(int out_fd = STDOUT_FILENO);
/frameworks/native/cmds/dumpstate/tests/
Ddumpstate_test.cpp1038 void CreateFd(const std::string& path, android::base::unique_fd* out_fd) { in CreateFd() argument
1039 out_fd->reset(TEMP_FAILURE_RETRY(open(path.c_str(), in CreateFd()
1042 ASSERT_GE(out_fd->get(), 0) << "could not create FD for path " << path; in CreateFd()
1065 android::base::unique_fd out_fd; in TEST_F() local
1066 CreateFd(out_path, &out_fd); in TEST_F()
1069 RedirectOutputToFd(out_fd); in TEST_F()
1744 auto dump_func_1 = [](int out_fd) { in TEST_F() argument
1745 dprintf(out_fd, "A"); in TEST_F()
1747 auto dump_func_2 = [](int out_fd) { in TEST_F() argument
1748 dprintf(out_fd, "B"); in TEST_F()
[all …]
/frameworks/native/cmds/installd/
Ddexopt.cpp844 unique_fd out_fd(open_reference_profile(packageUid, in copy_system_profile() local
853 if (out_fd.get() < 0) { in copy_system_profile()
865 if (flock(out_fd.get(), LOCK_EX | LOCK_NB) != 0) { in copy_system_profile()
881 bool truncated = ftruncate(out_fd.get(), 0) == 0; in copy_system_profile()
895 write(out_fd.get(), buffer, bytes); in copy_system_profile()
897 if (flock(out_fd.get(), LOCK_UN) != 0) { in copy_system_profile()
908 cleanup_output_fd(out_fd.get()); in copy_system_profile()