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
This commit is contained in:
Will McVicker 2024-03-07 11:13:47 -08:00
parent b2bfb972e8
commit 2d3658a421

View file

@ -41,6 +41,7 @@ class Modprobe {
std::vector<std::string>* 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<std::string>& args);
bool ParseAliasCallback(const std::vector<std::string>& args);