diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-05-22 12:10:56 +0200 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2018-08-24 16:47:08 +0200 |
commit | c401e41484ceba52cf56879e667ca5e23433cfb6 (patch) | |
tree | 38b09cff798e71b55903f28d368a0572ed66394c /src/login | |
parent | b670ce104933b9aa240eb06089dae9962cf938e3 (diff) |
tree-wide: port various bits of the tree over to the new DUMP_STRING_TABLE() macro
Diffstat (limited to 'src/login')
-rw-r--r-- | src/login/loginctl.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/login/loginctl.c b/src/login/loginctl.c index 9badf8e68..6b4c381f0 100644 --- a/src/login/loginctl.c +++ b/src/login/loginctl.c @@ -29,6 +29,7 @@ #include "sigbus.h" #include "signal-util.h" #include "spawn-polkit-agent.h" +//#include "string-table.h" #include "strv.h" #include "sysfs-show.h" #include "terminal-util.h" @@ -1507,6 +1508,11 @@ static int parse_argv(int argc, char *argv[]) { break; case 'o': + if (streq(optarg, "help")) { + DUMP_STRING_TABLE(output_mode, OutputMode, _OUTPUT_MODE_MAX); + return 0; + } + arg_output = output_mode_from_string(optarg); if (arg_output < 0) { log_error("Unknown output '%s'.", optarg); @@ -1546,6 +1552,11 @@ static int parse_argv(int argc, char *argv[]) { break; case 's': + if (streq(optarg, "help")) { + DUMP_STRING_TABLE(signal, int, _NSIG); + return 0; + } + arg_signal = signal_from_string(optarg); if (arg_signal < 0) { log_error("Failed to parse signal string %s.", optarg); |