summaryrefslogtreecommitdiff
path: root/libmodprobe/libmodprobe_ext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libmodprobe/libmodprobe_ext.cpp')
-rw-r--r--libmodprobe/libmodprobe_ext.cpp3
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;