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

Commit 552bbdde authored by Mark Salyzyn's avatar Mark Salyzyn Committed by Gerrit Code Review
Browse files

Merge "libmodprobe: add strict bool argument to LoadListedModules"

parents 94f476b0 d478271b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ class Modprobe {
  public:
    Modprobe(const std::vector<std::string>&);

    bool LoadListedModules();
    bool LoadListedModules(bool strict = true);
    bool LoadWithAliases(const std::string& module_name, bool strict,
                         const std::string& parameters = "");
    bool Remove(const std::string& module_name);
+5 −3
Original line number Diff line number Diff line
@@ -360,13 +360,15 @@ bool Modprobe::LoadWithAliases(const std::string& module_name, bool strict,
    return true;
}

bool Modprobe::LoadListedModules() {
bool Modprobe::LoadListedModules(bool strict) {
    auto ret = true;
    for (const auto& module : module_load_) {
        if (!LoadWithAliases(module, true)) {
            return false;
            ret = false;
            if (strict) break;
        }
    }
    return true;
    return ret;
}

bool Modprobe::Remove(const std::string& module_name) {