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

Commit a1ce5315 authored by Chaitanya Cheemala (xWF)'s avatar Chaitanya Cheemala (xWF) Committed by Automerger Merge Worker
Browse files

Merge "Revert "modprobe: Always log failures to the kernel logger"" into main...

Merge "Revert "modprobe: Always log failures to the kernel logger"" into main am: 96772653 am: c32c30c3

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



Change-Id: I8b640b89c6a72cf608de4ab5d2483ffdbb13cd79
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents b28b2ac2 c32c30c3
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ void print_usage(void) {
    LOG(INFO) << "  -h, --help: Print this help";
    LOG(INFO) << "  -l, --list: List modules matching pattern";
    LOG(INFO) << "  -r, --remove: Remove MODULE (multiple modules may be specified)";
    LOG(INFO) << "  -s, --syslog: print to syslog also (deprecated)";
    LOG(INFO) << "  -s, --syslog: print to syslog also";
    LOG(INFO) << "  -q, --quiet: disable messages";
    LOG(INFO) << "  -v, --verbose: enable more messages, even more with a second -v";
    LOG(INFO);
@@ -76,10 +76,12 @@ std::string stripComments(const std::string& str) {
    /* NOTREACHED */
}

auto syslog = false;

void MyLogger(android::base::LogId id, android::base::LogSeverity severity, const char* tag,
              const char* file, unsigned int line, const char* message) {
    android::base::StdioLogger(id, severity, tag, file, line, message);
    if (message[0]) {
    if (syslog && message[0]) {
        android::base::KernelLogger(id, severity, tag, file, line, message);
    }
}
@@ -198,6 +200,7 @@ extern "C" int modprobe_main(int argc, char** argv) {
                mode = RemoveModulesMode;
                break;
            case 's':
                syslog = true;
                break;
            case 'v':
                if (android::base::GetMinimumLogSeverity() <= android::base::DEBUG) {