From 2d3658a42111d44bd1fc386381de5ed0541ee291 Mon Sep 17 00:00:00 2001 From: Will McVicker Date: Thu, 7 Mar 2024 11:13:47 -0800 Subject: [PATCH] libmodprobe: Make IsBlocklisted() public This allows tools like modprobe to check if a module is blocklisted. Test: verified lsmod on pixel 6 Bug: 324018983 Change-Id: I5d5278ab056e58a4ee103db94b573928cbeb5c5f --- libmodprobe/include/modprobe/modprobe.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmodprobe/include/modprobe/modprobe.h b/libmodprobe/include/modprobe/modprobe.h index 5d79d6ab6..d7a90c488 100644 --- a/libmodprobe/include/modprobe/modprobe.h +++ b/libmodprobe/include/modprobe/modprobe.h @@ -41,6 +41,7 @@ class Modprobe { std::vector* post_dependencies); void ResetModuleCount() { module_count_ = 0; } int GetModuleCount() { return module_count_; } + bool IsBlocklisted(const std::string& module_name); private: std::string MakeCanonical(const std::string& module_path); @@ -52,7 +53,6 @@ class Modprobe { void AddOption(const std::string& module_name, const std::string& option_name, const std::string& value); std::string GetKernelCmdline(); - bool IsBlocklisted(const std::string& module_name); bool ParseDepCallback(const std::string& base_path, const std::vector& args); bool ParseAliasCallback(const std::vector& args);