X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fmain.c;h=d68e73769a69322b9554cffed01c79d27c16f533;hb=f5b51ea7fcb0b6380c3ceb4d4f3f22f647c6fd32;hp=0749f0413a7aca481b6964e0ed98c9dc4db4820a;hpb=5e07a79e84ab8b045b9df1a2719f14fc84471a1d;p=elogind.git diff --git a/src/core/main.c b/src/core/main.c index 0749f0413..d68e73769 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -23,11 +23,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include @@ -40,14 +38,12 @@ #endif #include "sd-daemon.h" -#include "sd-messages.h" #include "sd-bus.h" #include "log.h" #include "fdset.h" #include "special.h" #include "conf-parser.h" #include "missing.h" -#include "label.h" #include "pager.h" #include "build.h" #include "strv.h" @@ -55,7 +51,6 @@ #include "virt.h" #include "architecture.h" #include "watchdog.h" -#include "path-util.h" #include "switch-root.h" #include "capability.h" #include "killall.h" @@ -280,10 +275,10 @@ static int parse_proc_cmdline_item(const char *key, const char *value) { "s", SPECIAL_RESCUE_TARGET, "S", SPECIAL_RESCUE_TARGET, "1", SPECIAL_RESCUE_TARGET, - "2", SPECIAL_RUNLEVEL2_TARGET, - "3", SPECIAL_RUNLEVEL3_TARGET, - "4", SPECIAL_RUNLEVEL4_TARGET, - "5", SPECIAL_RUNLEVEL5_TARGET, + "2", SPECIAL_MULTI_USER_TARGET, + "3", SPECIAL_MULTI_USER_TARGET, + "4", SPECIAL_MULTI_USER_TARGET, + "5", SPECIAL_GRAPHICAL_TARGET, }; int r; @@ -2021,8 +2016,8 @@ finish: /* If we reboot let's set the shutdown * watchdog and tell the shutdown binary to * repeatedly ping it */ - watchdog_set_timeout(&arg_shutdown_watchdog); - watchdog_close(false); + r = watchdog_set_timeout(&arg_shutdown_watchdog); + watchdog_close(r < 0); /* Tell the binary how often to ping, ignore failure */ if (asprintf(&e, "WATCHDOG_USEC="USEC_FMT, arg_shutdown_watchdog) > 0)