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

Commit 8d5b4984 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "libmodprobe: improve error reporting." am: 2ab39411

Original change: https://android-review.googlesource.com/c/platform/system/core/+/1339492

Change-Id: I741f095314ec535af90b5aee3baa24e58ef16c58
parents 494ce517 2ab39411
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ bool Modprobe::Insmod(const std::string& path_name, const std::string& parameter
    android::base::unique_fd fd(
            TEMP_FAILURE_RETRY(open(path_name.c_str(), O_RDONLY | O_NOFOLLOW | O_CLOEXEC)));
    if (fd == -1) {
        LOG(ERROR) << "Could not open module '" << path_name << "'";
        PLOG(ERROR) << "Could not open module '" << path_name << "'";
        return false;
    }

@@ -49,7 +49,7 @@ bool Modprobe::Insmod(const std::string& path_name, const std::string& parameter
        options = options + " " + parameters;
    }

    LOG(INFO) << "Loading module " << path_name << " with args \"" << options << "\"";
    LOG(INFO) << "Loading module " << path_name << " with args '" << options << "'";
    int ret = syscall(__NR_finit_module, fd.get(), options.c_str(), 0);
    if (ret != 0) {
        if (errno == EEXIST) {
@@ -57,7 +57,7 @@ bool Modprobe::Insmod(const std::string& path_name, const std::string& parameter
            module_loaded_.emplace(canonical_name);
            return true;
        }
        LOG(ERROR) << "Failed to insmod '" << path_name << "' with args '" << options << "'";
        PLOG(ERROR) << "Failed to insmod '" << path_name << "' with args '" << options << "'";
        return false;
    }