git: d349bd35330d - main - shutdown: fix option sorting
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 09 Aug 2024 16:22:04 UTC
The branch main has been updated by kevans:
URL: https://cgit.FreeBSD.org/src/commit/?id=d349bd35330d3ec7ce1d3e7d6c2d6fc1f6a95704
commit d349bd35330d3ec7ce1d3e7d6c2d6fc1f6a95704
Author: Kyle Evans <kevans@FreeBSD.org>
AuthorDate: 2024-08-09 16:21:00 +0000
Commit: Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2024-08-09 16:21:00 +0000
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);