mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-10-28 20:25:25 +03:00
systemctl: ignore shutdown's "-t" argument (#7459)
We should not only ignore "-t" itself, but also whatever is passed to
it.
This pretty much reverts the core of
a4420f7b8e
, and adds back in the status
quo ante. What a difference a ':' can make.
This also adds a quick comment for this, so that we don't make this
mistake again.
Fixes: #7413
This commit is contained in:
parent
5f33279244
commit
b068c6f587
@ -8084,7 +8084,7 @@ static int shutdown_parse_argv(int argc, char *argv[]) {
|
||||
assert(argc >= 0);
|
||||
assert(argv);
|
||||
|
||||
while ((c = getopt_long(argc, argv, "HPrhkKtafFc", options, NULL)) >= 0)
|
||||
while ((c = getopt_long(argc, argv, "HPrhkKat:fFc", options, NULL)) >= 0)
|
||||
switch (c) {
|
||||
|
||||
case ARG_HELP:
|
||||
@ -8123,8 +8123,8 @@ static int shutdown_parse_argv(int argc, char *argv[]) {
|
||||
arg_no_wall = true;
|
||||
break;
|
||||
|
||||
case 't':
|
||||
case 'a':
|
||||
case 't': /* Note that we also ignore any passed argument to -t, not just the -t itself */
|
||||
case 'f':
|
||||
case 'F':
|
||||
/* Compatibility nops */
|
||||
|
Loading…
Reference in New Issue
Block a user