diff options
author | Elliott Hughes <enh@google.com> | 2020-06-16 11:48:28 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2020-06-16 11:48:28 -0700 |
commit | 1ab2c02324972e7c3355ee40e52549acd0e345f9 (patch) | |
tree | 292e382d1e07e2189c649983f5b012a9fec14dc8 /libmodprobe/libmodprobe_ext.cpp | |
parent | e4424ff4223974a1228369dbdc3f1efc7254b9b4 (diff) |
libmodprobe: improve error reporting.
Bug: http://b/159064719
Test: treehugger
Change-Id: Ie3ea73a934a30b4674b30fd3823f59f062418ac7
Diffstat (limited to 'libmodprobe/libmodprobe_ext.cpp')
-rw-r--r-- | libmodprobe/libmodprobe_ext.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libmodprobe/libmodprobe_ext.cpp b/libmodprobe/libmodprobe_ext.cpp index 658970874..5e4fddd44 100644 --- a/libmodprobe/libmodprobe_ext.cpp +++ b/libmodprobe/libmodprobe_ext.cpp @@ -35,7 +35,7 @@ bool Modprobe::Insmod(const std::string& path_name, const std::string& parameter android::base::unique_fd fd( TEMP_FAILURE_RETRY(open(path_name.c_str(), O_RDONLY | O_NOFOLLOW | O_CLOEXEC))); if (fd == -1) { - LOG(ERROR) << "Could not open module '" << path_name << "'"; + PLOG(ERROR) << "Could not open module '" << path_name << "'"; return false; } @@ -49,7 +49,7 @@ bool Modprobe::Insmod(const std::string& path_name, const std::string& parameter options = options + " " + parameters; } - LOG(INFO) << "Loading module " << path_name << " with args \"" << options << "\""; + LOG(INFO) << "Loading module " << path_name << " with args '" << options << "'"; int ret = syscall(__NR_finit_module, fd.get(), options.c_str(), 0); if (ret != 0) { if (errno == EEXIST) { @@ -57,7 +57,7 @@ bool Modprobe::Insmod(const std::string& path_name, const std::string& parameter module_loaded_.emplace(canonical_name); return true; } - LOG(ERROR) << "Failed to insmod '" << path_name << "' with args '" << options << "'"; + PLOG(ERROR) << "Failed to insmod '" << path_name << "' with args '" << options << "'"; return false; } |