Home
last modified time | relevance | path

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

/frameworks/native/cmds/dumpstate/
DDumpstateInternal.cpp128 int DumpFileFromFdToFd(const std::string& title, const std::string& path_string, int fd, int out_fd, in DumpFileFromFdToFd() argument
132 dprintf(out_fd, "------ %s (%s", title.c_str(), path); in DumpFileFromFdToFd()
143 dprintf(out_fd, ": %s", stamp); in DumpFileFromFdToFd()
145 dprintf(out_fd, ") ------\n"); in DumpFileFromFdToFd()
146 fsync(out_fd); in DumpFileFromFdToFd()
149 if (out_fd != STDOUT_FILENO) { in DumpFileFromFdToFd()
151 dprintf(out_fd, "%s: skipped on dry run\n", path); in DumpFileFromFdToFd()
153 dprintf(out_fd, "\t(skipped on dry run)\n"); in DumpFileFromFdToFd()
155 fsync(out_fd); in DumpFileFromFdToFd()
164 dprintf(out_fd, "*** %s: poll failed: %s\n", path, strerror(errno)); in DumpFileFromFdToFd()
[all …]
DDumpstateUtil.cpp205 int DumpFileToFd(int out_fd, const std::string& title, const std::string& path) { in DumpFileToFd() argument
210 dprintf(out_fd, "*** Error dumping %s: %s\n", path.c_str(), strerror(err)); in DumpFileToFd()
212 dprintf(out_fd, "*** Error dumping %s (%s): %s\n", path.c_str(), title.c_str(), in DumpFileToFd()
215 fsync(out_fd); in DumpFileToFd()
218 return DumpFileFromFdToFd(title, path, fd.get(), out_fd, PropertiesHelper::IsDryRun()); in DumpFileToFd()
DDumpstateInternal.h58 int DumpFileFromFdToFd(const std::string& title, const std::string& path_string, int fd, int out_fd,
Ddumpstate.cpp168 bool CopyFile(int in_fd, int out_fd) { in CopyFile() argument
172 if (!android::base::WriteFully(out_fd, buf, byte_count)) { in CopyFile()
179 static bool CopyFileToFd(const std::string& input_file, int out_fd) { in CopyFileToFd() argument
180 MYLOGD("Going to copy file (%s) to %d\n", input_file.c_str(), out_fd); in CopyFileToFd()
184 if (out_fd != -1 && in_fd.get() != -1) { in CopyFileToFd()
185 if (CopyFile(in_fd.get(), out_fd)) { in CopyFileToFd()
/frameworks/native/cmds/installd/
Ddexopt.cpp965 unique_fd out_fd(open_reference_profile(packageUid, in copy_system_profile() local
974 if (out_fd.get() < 0) { in copy_system_profile()
986 if (flock(out_fd.get(), LOCK_EX | LOCK_NB) != 0) { in copy_system_profile()
1000 bool truncated = ftruncate(out_fd.get(), 0) == 0; in copy_system_profile()
1013 write(out_fd.get(), buffer, bytes); in copy_system_profile()
1015 if (flock(out_fd.get(), LOCK_UN) != 0) { in copy_system_profile()