if (recurse) {
DeleteDirectoryContents(file, recurse);
// Try to rmdir the directory.
- if (TEMP_FAILURE_RETRY(rmdir(file.c_str())) != 0) {
+ if (rmdir(file.c_str()) != 0) {
PLOG(ERROR) << "Unable to rmdir " << file;
}
}
}
} else {
// Try to unlink the file.
- if (TEMP_FAILURE_RETRY(unlink(file.c_str())) != 0) {
+ if (unlink(file.c_str()) != 0) {
PLOG(ERROR) << "Unable to unlink " << file;
}
}
}
- CHECK_EQ(0, TEMP_FAILURE_RETRY(closedir(c_dir))) << "Unable to close directory.";
+ CHECK_EQ(0, closedir(c_dir)) << "Unable to close directory.";
}
static bool HasContent(const char* dir) {
continue;
}
// Something here.
- CHECK_EQ(0, TEMP_FAILURE_RETRY(closedir(c_dir))) << "Unable to close directory.";
+ CHECK_EQ(0, closedir(c_dir)) << "Unable to close directory.";
return true;
}
- CHECK_EQ(0, TEMP_FAILURE_RETRY(closedir(c_dir))) << "Unable to close directory.";
+ CHECK_EQ(0, closedir(c_dir)) << "Unable to close directory.";
return false;
}
}
}
if (OS::DirectoryExists(dir.c_str())) {
- if (TEMP_FAILURE_RETRY(rmdir(dir.c_str())) != 0) {
+ if (rmdir(dir.c_str()) != 0) {
PLOG(ERROR) << "Unable to rmdir " << dir;
return;
}
return;
}
- if (TEMP_FAILURE_RETRY(rename(src, trg)) != 0) {
+ if (rename(src, trg) != 0) {
PLOG(ERROR) << "Could not rename OTA cache " << src << " to target " << trg;
}
}
OatFileAssistant::~OatFileAssistant() {
// Clean up the lock file.
if (flock_.HasFile()) {
- TEMP_FAILURE_RETRY(unlink(flock_.GetFile()->GetPath().c_str()));
+ unlink(flock_.GetFile()->GetPath().c_str());
}
}
std::string lock_file_name = *OatFileName() + ".flock";
if (!flock_.Init(lock_file_name.c_str(), error_msg)) {
- TEMP_FAILURE_RETRY(unlink(lock_file_name.c_str()));
+ unlink(lock_file_name.c_str());
return false;
}
return true;
if (!Exec(argv, error_msg)) {
// Manually delete the file. This ensures there is no garbage left over if
// the process unexpectedly died.
- TEMP_FAILURE_RETRY(unlink(oat_file_name.c_str()));
+ unlink(oat_file_name.c_str());
return kUpdateFailed;
}
// Manually delete the file. This ensures there is no garbage left over if
// the process unexpectedly died.
oat_file->Erase();
- TEMP_FAILURE_RETRY(unlink(oat_file_name.c_str()));
+ unlink(oat_file_name.c_str());
return kUpdateFailed;
}
if (oat_file->FlushCloseOrErase() != 0) {
*error_msg = "Unable to close oat file " + oat_file_name;
- TEMP_FAILURE_RETRY(unlink(oat_file_name.c_str()));
+ unlink(oat_file_name.c_str());
return kUpdateFailed;
}