Merge changes I68f7d46b,I5d5278ab into main
* changes: toolbox/modprobe: Fix failure due to blocklist libmodprobe: Make IsBlocklisted() public
This commit is contained in:
commit
0c2301240a
2 changed files with 2 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -257,6 +257,7 @@ extern "C" int modprobe_main(int argc, char** argv) {
|
|||
switch (mode) {
|
||||
case AddModulesMode:
|
||||
if (!m.LoadWithAliases(module, true, module_parameters)) {
|
||||
if (m.IsBlocklisted(module)) continue;
|
||||
PLOG(ERROR) << "Failed to load module " << module;
|
||||
rv = EXIT_FAILURE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue