Lines Matching refs:path_
2163 ds.path_ = ds.GetPath(".zip"); in PrepareToWriteToFile()
2164 MYLOGD("Creating initial .zip file (%s)\n", ds.path_.c_str()); in PrepareToWriteToFile()
2165 create_parent_dirs(ds.path_.c_str()); in PrepareToWriteToFile()
2166 ds.zip_file.reset(fopen(ds.path_.c_str(), "wb")); in PrepareToWriteToFile()
2168 MYLOGE("fopen(%s, 'wb'): %s\n", ds.path_.c_str(), strerror(errno)); in PrepareToWriteToFile()
2217 if (ds.path_ != new_path) { in FinalizeFile()
2218 MYLOGD("Renaming zip file from %s to %s\n", ds.path_.c_str(), new_path.c_str()); in FinalizeFile()
2219 if (rename(ds.path_.c_str(), new_path.c_str())) { in FinalizeFile()
2220 MYLOGE("rename(%s, %s): %s\n", ds.path_.c_str(), new_path.c_str(), in FinalizeFile()
2223 ds.path_ = new_path; in FinalizeFile()
2229 ds.path_ = ds.GetPath(".txt"); in FinalizeFile()
2230 MYLOGD("Generating .txt bugreport at %s from %s\n", ds.path_.c_str(), ds.tmp_path_.c_str()); in FinalizeFile()
2231 if (rename(ds.tmp_path_.c_str(), ds.path_.c_str())) { in FinalizeFile()
2232 MYLOGE("rename(%s, %s): %s\n", ds.tmp_path_.c_str(), ds.path_.c_str(), strerror(errno)); in FinalizeFile()
2233 ds.path_.clear(); in FinalizeFile()
2243 dprintf(ds.control_socket_fd_, "OK:%s\n", ds.path_.c_str()); in FinalizeFile()
2251 if (!ds.path_.empty()) { in SendBugreportFinishedBroadcast()
2252 MYLOGI("Final bugreport path: %s\n", ds.path_.c_str()); in SendBugreportFinishedBroadcast()
2260 "--es", "android.intent.extra.BUGREPORT", ds.path_, in SendBugreportFinishedBroadcast()
2282 am_args.push_back(SHA256_file_hash(ds.path_)); in SendBugreportFinishedBroadcast()
2690 dprintf(control_socket_fd_, "BEGIN:%s\n", path_.c_str()); in RunInternal()
2712 if (chown(path_.c_str(), AID_SHELL, AID_SHELL)) { in RunInternal()
2713 MYLOGE("Unable to change ownership of zip file %s: %s\n", path_.c_str(), in RunInternal()
2875 android::os::UnlinkAndLogOnError(path_); in CleanupFiles()
2909 bool copy_succeeded = android::os::CopyFileToFd(path_, options_->bugreport_fd.get()); in CopyBugreportIfUserConsented()
2911 android::os::UnlinkAndLogOnError(path_); in CopyBugreportIfUserConsented()
3017 path_(path) { in Progress()
3018 if (!path_.empty()) { in Progress()
3024 MYLOGD("Loading stats from %s\n", path_.c_str()); in Load()
3026 if (!android::base::ReadFileToString(path_, &content)) { in Load()
3027 MYLOGI("Could not read stats from %s; using max of %d\n", path_.c_str(), max_); in Load()
3031 MYLOGE("No stats (empty file) on %s; using max of %d\n", path_.c_str(), max_); in Load()
3037 MYLOGE("Invalid stats on file %s: not enough lines (%d). Using max of %d\n", path_.c_str(), in Load()
3046 MYLOGE("Invalid stats line on file %s: %s\n", path_.c_str(), lines[0].c_str()); in Load()
3061 path_.c_str()); in Save()
3062 if (path_.empty()) { in Save()
3067 if (!android::base::WriteStringToFile(content, path_)) { in Save()
3068 MYLOGE("Could not save stats on %s\n", path_.c_str()); in Save()
3104 dprintf(fd, "%spath: %s\n", pr, path_.c_str()); in Dump()