Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b9dead1a authored by Will McVicker's avatar Will McVicker
Browse files

toolbox/modprobe: Fix failure due to blocklist

When a module is blocklisted, LoadWithAliases() will return an error
indicating the module failed to load. When the blocklist is requested
(via the -b parameter), let's not return an error if a blocklisted
module fails to load.

Test: verified lsmod on pixel 6
Bug: 324018983
Change-Id: I68f7d46bf9fd99e4b4e51ef92ea71686907f1125
parent 2d3658a4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
                }