Lines Matching full:tmp_target_filename
783 const std::string tmp_target_filename = std::string(target_filename) + ".patch";
899 output_fd = ota_open(tmp_target_filename.c_str(), O_WRONLY | O_CREAT | O_TRUNC | O_SYNC,
902 tmp_target_filename.c_str(),
924 printf("failed to fsync file \"%s\" (%s)\n", tmp_target_filename.c_str(),
929 printf("failed to close file \"%s\" (%s)\n", tmp_target_filename.c_str(),
943 unlink(tmp_target_filename.c_str());
970 if (chmod(tmp_target_filename.c_str(), source_to_use->st.st_mode) != 0) {
971 printf("chmod of \"%s\" failed: %s\n", tmp_target_filename.c_str(), strerror(errno));
974 if (chown(tmp_target_filename.c_str(), source_to_use->st.st_uid, source_to_use->st.st_gid) != 0) {
975 printf("chown of \"%s\" failed: %s\n", tmp_target_filename.c_str(), strerror(errno));
980 if (rename(tmp_target_filename.c_str(), target_filename) != 0) {