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 52e308fab..3e9ff70cb 100644
--- a/libmodprobe/libmodprobe_ext.cpp
+++ b/libmodprobe/libmodprobe_ext.cpp
@@ -65,6 +65,9 @@ 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)) {
+ return false;
+ }
auto deps = GetDependencies(module_name);
if (deps.empty()) {
// missing deps can happen in the case of an alias