X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fmain.c;h=e5bdf849be14cfda4a18d193566c52db9bf2ba64;hb=5b6319dceedd81f3f1ce7eb70ea5defaef43bcec;hp=7c93f6d9c7c16eca8ee186f8d60fdb21c6ca74f3;hpb=93a46b0bc51cf2beb8523830ef7fd74aa0869673;p=elogind.git diff --git a/src/main.c b/src/main.c index 7c93f6d9c..e5bdf849b 100644 --- a/src/main.c +++ b/src/main.c @@ -233,8 +233,8 @@ static int parse_proc_cmdline_word(const char *word) { "5", SPECIAL_RUNLEVEL5_TARGET }; - if (startswith(word, "systemd.default=")) - return set_default_unit(word + 16); + if (startswith(word, "systemd.unit=")) + return set_default_unit(word + 13); else if (startswith(word, "systemd.log_target=")) { @@ -284,7 +284,7 @@ static int parse_proc_cmdline_word(const char *word) { log_warning("Unknown kernel switch %s. Ignoring.", word); log_info("Supported kernel switches:"); - log_info("systemd.default=UNIT Default unit to start"); + log_info("systemd.unit=UNIT Default unit to start"); log_info("systemd.log_target=console|kmsg|syslog Log target"); log_info("systemd.log_level=LEVEL Log level"); log_info("systemd.dump_core=0|1 Dump core on crash"); @@ -343,7 +343,7 @@ static int parse_argv(int argc, char *argv[]) { enum { ARG_LOG_LEVEL = 0x100, ARG_LOG_TARGET, - ARG_DEFAULT, + ARG_UNIT, ARG_RUNNING_AS, ARG_TEST, ARG_DUMP_CONFIGURATION_ITEMS, @@ -355,7 +355,7 @@ static int parse_argv(int argc, char *argv[]) { static const struct option options[] = { { "log-level", required_argument, NULL, ARG_LOG_LEVEL }, { "log-target", required_argument, NULL, ARG_LOG_TARGET }, - { "default", required_argument, NULL, ARG_DEFAULT }, + { "unit", required_argument, NULL, ARG_UNIT }, { "running-as", required_argument, NULL, ARG_RUNNING_AS }, { "test", no_argument, NULL, ARG_TEST }, { "help", no_argument, NULL, 'h' }, @@ -392,7 +392,7 @@ static int parse_argv(int argc, char *argv[]) { break; - case ARG_DEFAULT: + case ARG_UNIT: if ((r = set_default_unit(optarg)) < 0) { log_error("Failed to set default unit %s: %s", optarg, strerror(-r)); @@ -496,7 +496,7 @@ static int help(void) { printf("%s [options]\n\n" " -h --help Show this help\n" - " --default=UNIT Set default unit\n" + " --unit=UNIT Set default unit\n" " --log-level=LEVEL Set log level\n" " --log-target=TARGET Set log target (console, syslog, kmsg, syslog-or-kmsg)\n" " --running-as=AS Set running as (init, system, session)\n" @@ -504,7 +504,7 @@ static int help(void) { " --dump-configuration-items Dump understood unit configuration items\n" " --confirm-spawn Ask for confirmation when spawning processes\n" " --introspect[=INTERFACE] Extract D-Bus interface data\n", - __progname); + program_invocation_short_name); return 0; }