diff options
author | Steve Muckle <smuckle@google.com> | 2019-08-01 16:03:02 -0700 |
---|---|---|
committer | Steve Muckle <smuckle@google.com> | 2019-08-06 13:58:13 -0700 |
commit | ded44c06be23dc7447fb3e3f33f7d998c418657e (patch) | |
tree | 8ebe1ee28f98349d1c400d5b4c94ef1029518696 /libmodprobe/libmodprobe_ext.cpp | |
parent | 781aa78ee25fca2bb27a9b724ae111f9581e63f7 (diff) |
libmodprobe: add verbose mode
Change-Id: I2be18320461cd712a4828400b8f29bb5f07c801f
Diffstat (limited to 'libmodprobe/libmodprobe_ext.cpp')
-rw-r--r-- | libmodprobe/libmodprobe_ext.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libmodprobe/libmodprobe_ext.cpp b/libmodprobe/libmodprobe_ext.cpp index 3e9ff70cb..2efcac290 100644 --- a/libmodprobe/libmodprobe_ext.cpp +++ b/libmodprobe/libmodprobe_ext.cpp @@ -66,6 +66,7 @@ bool Modprobe::Rmmod(const std::string& module_name) { bool Modprobe::ModuleExists(const std::string& module_name) { struct stat fileStat; if (blacklist_enabled && module_blacklist_.count(module_name)) { + LOG(INFO) << "module " << module_name << " is blacklisted"; return false; } auto deps = GetDependencies(module_name); @@ -74,9 +75,11 @@ bool Modprobe::ModuleExists(const std::string& module_name) { return false; } if (stat(deps.front().c_str(), &fileStat)) { + LOG(INFO) << "module " << module_name << " does not exist"; return false; } if (!S_ISREG(fileStat.st_mode)) { + LOG(INFO) << "module " << module_name << " is not a regular file"; return false; } return true; |