From d349bd35330d3ec7ce1d3e7d6c2d6fc1f6a95704 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Fri, 9 Aug 2024 11:21:00 -0500 Subject: [PATCH] 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: 6c7ec630c24 ("shutdown: add a -q(uiet) flag to suppress [...]") Sponsored by: Klara, Inc. --- sbin/shutdown/shutdown.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sbin/shutdown/shutdown.c b/sbin/shutdown/shutdown.c index 101e003b44e2..e92d41220a20 100644 --- a/sbin/shutdown/shutdown.c +++ b/sbin/shutdown/shutdown.c @@ -133,7 +133,7 @@ main(int argc, char **argv) goto poweroff; } - while ((ch = getopt(argc, argv, "-chknoprq")) != -1) + while ((ch = getopt(argc, argv, "-chknopqr")) != -1) switch (ch) { case '-': readstdin = 1; @@ -156,12 +156,12 @@ main(int argc, char **argv) case 'p': dopower = 1; break; - case 'r': - doreboot = 1; - break; case 'q': dowarn = false; break; + case 'r': + doreboot = 1; + break; case '?': default: usage((char *)NULL);