diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-04-23 10:19:46 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-05-03 10:55:51 +0200 |
commit | fc021a5bbf1b00a3ac21845f3102f1a6379a9357 (patch) | |
tree | ba28af074ae6109739ef5dfdeb3fad927d34f65a /src/login/logind.c | |
parent | 7ae473268c092cbe8235462c0aea923d9ce36901 (diff) | |
download | systemd-fc021a5bbf1b00a3ac21845f3102f1a6379a9357.tar.gz |
logind,importd,hostnamed,localed,timedated,machined,resolved: add option parsing stubs
--help and --version are implemented in the usual style.
help() prints full path, since the program is not expected to
be in $PATH.
Diffstat (limited to 'src/login/logind.c')
-rw-r--r-- | src/login/logind.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/login/logind.c b/src/login/logind.c index 75958189ac..4678b22bea 100644 --- a/src/login/logind.c +++ b/src/login/logind.c @@ -27,6 +27,7 @@ #include "parse-util.h" #include "process-util.h" #include "selinux-util.h" +#include "service-util.h" #include "signal-util.h" #include "strv.h" #include "terminal-util.h" @@ -1201,12 +1202,13 @@ static int run(int argc, char *argv[]) { log_set_facility(LOG_AUTH); log_setup_service(); - umask(0022); + r = service_parse_argv("systemd-logind.service", + "Manager for user logins and devices and privileged operations.", + argc, argv); + if (r <= 0) + return r; - if (argc != 1) { - log_error("This program takes no arguments."); - return -EINVAL; - } + umask(0022); r = mac_selinux_init(); if (r < 0) |