/frameworks/native/cmds/dumpstate/ |
D | DumpstateInternal.cpp | 134 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 …]
|
D | DumpPool.cpp | 83 int out_fd) { in waitForTask() argument 97 DumpFileToFd(out_fd, title, result); in waitForTask() 113 const std::string& duration_title, int out_fd) { in invokeTask() argument 115 /*verbose =*/false, out_fd); in invokeTask() 121 const std::string& duration_title, int out_fd) { in invokeTask() argument 123 /*verbose =*/false, out_fd); in invokeTask() 124 std::invoke(dump_func, out_fd); in invokeTask()
|
D | dumpstate.cpp | 133 bool verbose_duration = false, int out_fd = STDOUT_FILENO) { in RunCommand() argument 134 return ds.RunCommand(title, full_command, options, verbose_duration, out_fd); in RunCommand() 255 bool CopyFile(int in_fd, int out_fd) { in CopyFile() argument 259 if (!android::base::WriteFully(out_fd, buf, byte_count)) { in CopyFile() 266 static bool CopyFileToFd(const std::string& input_file, int out_fd) { in CopyFileToFd() argument 267 MYLOGD("Going to copy file (%s) to %d\n", input_file.c_str(), out_fd); in CopyFileToFd() 271 if (out_fd != -1 && in_fd.get() != -1) { in CopyFileToFd() 272 if (CopyFile(in_fd.get(), out_fd)) { in CopyFileToFd() 332 android::base::unique_fd out_fd(OpenForWrite(output_file)); in CopyFileToFile() local 333 return CopyFileToFd(input_file, out_fd.get()); in CopyFileToFile() [all …]
|
D | DumpstateUtil.cpp | 225 int DumpFileToFd(int out_fd, const std::string& title, const std::string& path) { in DumpFileToFd() argument 230 dprintf(out_fd, "*** Error dumping %s: %s\n", path.c_str(), strerror(err)); in DumpFileToFd() 232 dprintf(out_fd, "*** Error dumping %s (%s): %s\n", path.c_str(), title.c_str(), in DumpFileToFd() 235 fsync(out_fd); in DumpFileToFd() 238 return DumpFileFromFdToFd(title, path, fd.get(), out_fd, PropertiesHelper::IsDryRun()); in DumpFileToFd()
|
D | DumpPool.h | 135 void waitForTask(const std::string& task_name, const std::string& title, int out_fd); 148 template<class T> void invokeTask(T dump_func, const std::string& duration_title, int out_fd);
|
D | DumpstateInternal.h | 59 int DumpFileFromFdToFd(const std::string& title, const std::string& path_string, int fd, int out_fd,
|
D | dumpstate.h | 241 bool verbose_duration = false, int out_fd = STDOUT_FILENO); 259 long dumpsys_timeout_ms = 0, int out_fd = STDOUT_FILENO); 321 void DumpstateBoard(int out_fd = STDOUT_FILENO);
|
/frameworks/native/cmds/dumpstate/tests/ |
D | dumpstate_test.cpp | 1012 void CreateFd(const std::string& path, android::base::unique_fd* out_fd) { in CreateFd() argument 1013 out_fd->reset(TEMP_FAILURE_RETRY(open(path.c_str(), in CreateFd() 1016 ASSERT_GE(out_fd->get(), 0) << "could not create FD for path " << path; in CreateFd() 1038 android::base::unique_fd out_fd; in TEST_F() local 1039 CreateFd(out_path, &out_fd); in TEST_F() 1042 RedirectOutputToFd(out_fd); in TEST_F() 1722 auto dump_func_1 = [](int out_fd) { in TEST_F() argument 1723 dprintf(out_fd, "A"); in TEST_F() 1725 auto dump_func_2 = [](int out_fd) { in TEST_F() argument 1726 dprintf(out_fd, "B"); in TEST_F() [all …]
|
/frameworks/native/cmds/installd/ |
D | dexopt.cpp | 741 unique_fd out_fd(open_reference_profile(packageUid, in copy_system_profile() local 750 if (out_fd.get() < 0) { in copy_system_profile() 762 if (flock(out_fd.get(), LOCK_EX | LOCK_NB) != 0) { in copy_system_profile() 778 bool truncated = ftruncate(out_fd.get(), 0) == 0; in copy_system_profile() 792 write(out_fd.get(), buffer, bytes); in copy_system_profile() 794 if (flock(out_fd.get(), LOCK_UN) != 0) { in copy_system_profile()
|