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

Commit 28dc06b5 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Use ro.boot.serialconsole to disable console services" am: 8dab2ef5...

Merge "Use ro.boot.serialconsole to disable console services" am: 8dab2ef5 am: 55ba50e2 am: a0242991

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



Change-Id: Ic9d785a4ae321d1191f6a36ef1d203657e2eead3
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents ff681759 a0242991
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -447,6 +447,15 @@ Result<void> Service::CheckConsole() {
        return {};
    }

    // On newer kernels, /dev/console will always exist because
    // "console=ttynull" is hard-coded in CONFIG_CMDLINE. This new boot
    // property should be set via "androidboot.serialconsole=0" to explicitly
    // disable services requiring the console. For older kernels and boot
    // images, not setting this at all will fall back to the old behavior
    if (GetProperty("ro.boot.serialconsole", "") == "0") {
        return {};
    }

    if (proc_attr_.console.empty()) {
        proc_attr_.console = "/dev/" + GetProperty("ro.boot.console", "console");
    }