X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fmain.c;h=d9dd0ac4924ba028e9448faba34e24260ff6ae54;hb=6a3b1508f7a9c8ecf712beb44baa13f252f0d3d8;hp=99e277c67b9fd290bd4095425344c852e62e529e;hpb=06d4c99ab3d479c1a7c087a87e82fe01626128f6;p=elogind.git diff --git a/src/main.c b/src/main.c index 99e277c67..d9dd0ac49 100644 --- a/src/main.c +++ b/src/main.c @@ -72,7 +72,6 @@ static bool arg_sysv_console = true; #endif static bool arg_mount_auto = true; static bool arg_swap_auto = true; -static char *arg_console = NULL; static char **arg_default_controllers = NULL; static FILE* serialization = NULL; @@ -329,26 +328,6 @@ static int parse_proc_cmdline_word(const char *word) { "systemd.log_color=0|1 Highlight important log messages\n" "systemd.log_location=0|1 Include code location in log messages\n"); - } else if (startswith(word, "console=")) { - const char *k; - size_t l; - char *w = NULL; - - k = word + 8; - l = strcspn(k, ","); - - /* Ignore the console setting if set to a VT */ - if (l < 4 || - !startswith(k, "tty") || - k[3+strspn(k+3, "0123456789")] != 0) { - - if (!(w = strndup(k, l))) - return -ENOMEM; - } - - free(arg_console); - arg_console = w; - } else if (streq(word, "quiet")) { arg_show_status = false; #ifdef HAVE_SYSV_COMPAT @@ -899,7 +878,7 @@ static void test_mtab(void) { if (readlink_malloc("/etc/mtab", &p) >= 0) { bool b; - b = streq(p, "/proc/self/mounts"); + b = streq(p, "/proc/self/mounts") || streq(p, "/proc/mounts"); free(p); if (b) @@ -985,6 +964,11 @@ int main(int argc, char *argv[]) { if (parse_argv(argc, argv) < 0) goto finish; + /* If Plymouth is being run make sure we show the status, so + * that there's something nice to see when people press Esc */ + if (access("/dev/.systemd/plymouth", F_OK) >= 0) + arg_show_status = true; + if (arg_action == ACTION_HELP) { retval = help(); goto finish; @@ -1089,9 +1073,6 @@ int main(int argc, char *argv[]) { if (dual_timestamp_is_set(&initrd_timestamp)) m->initrd_timestamp = initrd_timestamp; - if (arg_console) - manager_set_console(m, arg_console); - if (arg_default_controllers) manager_set_default_controllers(m, arg_default_controllers); @@ -1216,7 +1197,6 @@ finish: manager_free(m); free(arg_default_unit); - free(arg_console); strv_free(arg_default_controllers); dbus_shutdown();