shutdown: fix option sorting

A last minute change moved this from -W to -q; fix the sorting in a few
places to reflect that.

Fixes: 6c7ec630c2 ("shutdown: add a -q(uiet) flag to suppress [...]")
Sponsored by:	Klara, Inc.
This commit is contained in:
Kyle Evans 2024-08-09 11:21:00 -05:00
parent 6c7ec630c2
commit d349bd3533

View File

@ -133,7 +133,7 @@ main(int argc, char **argv)
goto poweroff; goto poweroff;
} }
while ((ch = getopt(argc, argv, "-chknoprq")) != -1) while ((ch = getopt(argc, argv, "-chknopqr")) != -1)
switch (ch) { switch (ch) {
case '-': case '-':
readstdin = 1; readstdin = 1;
@ -156,12 +156,12 @@ main(int argc, char **argv)
case 'p': case 'p':
dopower = 1; dopower = 1;
break; break;
case 'r':
doreboot = 1;
break;
case 'q': case 'q':
dowarn = false; dowarn = false;
break; break;
case 'r':
doreboot = 1;
break;
case '?': case '?':
default: default:
usage((char *)NULL); usage((char *)NULL);