Lines Matching refs:zip_path
199 bool copyFile(const std::string& zip_path, int output_socket) { in copyFile() argument
200 android::base::unique_fd fd(TEMP_FAILURE_RETRY(open(zip_path.c_str(), O_RDONLY | O_NOFOLLOW))); in copyFile()
202 ALOGE("Failed to open zip file %s.", zip_path.c_str()); in copyFile()
212 ALOGE("Failed to copy zip file %s to the output_socket.", zip_path.c_str()); in copyFile()
221 bool doBugreport(int progress_socket, size_t* out_bytes_written, std::string* zip_path) { in doBugreport() argument
260 processLine(line, zip_path, &last_nonempty_line); in doBugreport()
270 processLine(line, zip_path, &last_nonempty_line); in doBugreport()
272 if (zip_path->empty()) { in doBugreport()
442 void cleanupBugreportFile(const std::string& zip_path) { in cleanupBugreportFile() argument
443 if (unlink(zip_path.c_str()) != 0) { in cleanupBugreportFile()
444 ALOGE("Could not unlink %s (%s)", zip_path.c_str(), strerror(errno)); in cleanupBugreportFile()
466 std::string zip_path; in main() local
473 bool is_success = doBugreport(progress_socket, &bytes_written, &zip_path); in main()
479 is_success = copyFile(zip_path, output_socket); in main()
495 cleanupBugreportFile(zip_path); in main()