art: use PLOG rather than LOG strerror.
Test: builds
Change-Id: I01a9371247feceb62e3aa97165249f4799978fb9
diff --git a/profman/profman.cc b/profman/profman.cc
index b29e743..f90bba9 100644
--- a/profman/profman.cc
+++ b/profman/profman.cc
@@ -521,7 +521,7 @@
#endif
fd = open(filename.c_str(), flags);
if (fd < 0) {
- LOG(ERROR) << "Cannot open " << filename << strerror(errno);
+ PLOG(ERROR) << "Cannot open " << filename;
return nullptr;
}
}
@@ -690,7 +690,7 @@
#endif
int fd = open(profile_file.c_str(), flags);
if (!FdIsValid(fd)) {
- LOG(ERROR) << "Cannot open " << profile_file << strerror(errno);
+ PLOG(ERROR) << "Cannot open " << profile_file;
return false;
}
if (!GetClassNamesAndMethods(fd, dex_files, out_lines)) {
@@ -1076,7 +1076,7 @@
#endif
fd = open(reference_profile_file_.c_str(), flags, 0644);
if (fd < 0) {
- LOG(ERROR) << "Cannot open " << reference_profile_file_ << strerror(errno);
+ PLOG(ERROR) << "Cannot open " << reference_profile_file_;
return kInvalidFd;
}
}
@@ -1214,7 +1214,7 @@
#endif
int profile_test_fd = open(test_profile_.c_str(), flags, 0644);
if (profile_test_fd < 0) {
- LOG(ERROR) << "Cannot open " << test_profile_ << strerror(errno);
+ PLOG(ERROR) << "Cannot open " << test_profile_;
return -1;
}
bool result;
diff --git a/tools/hiddenapi/hiddenapi_test.cc b/tools/hiddenapi/hiddenapi_test.cc
index 213692b..9f65a54 100644
--- a/tools/hiddenapi/hiddenapi_test.cc
+++ b/tools/hiddenapi/hiddenapi_test.cc
@@ -112,7 +112,7 @@
File fd(file.GetFilename(), O_RDONLY, /* check_usage= */ false);
if (fd.Fd() == -1) {
- LOG(FATAL) << "Unable to open file '" << file.GetFilename() << "': " << strerror(errno);
+ PLOG(FATAL) << "Unable to open file '" << file.GetFilename() << "'";
UNREACHABLE();
}
@@ -133,7 +133,7 @@
std::ofstream OpenStream(const ScratchFile& file) {
std::ofstream ofs(file.GetFilename(), std::ofstream::out);
if (ofs.fail()) {
- LOG(FATAL) << "Open failed for '" << file.GetFilename() << "' " << strerror(errno);
+ PLOG(FATAL) << "Open failed for '" << file.GetFilename() << "'";
UNREACHABLE();
}
return ofs;