git: aa9ad4d484ef - stable/13 - lockf: correct omission in the usage statement
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 15 Dec 2023 18:57:28 UTC
The branch stable/13 has been updated by kevans:
URL: https://cgit.FreeBSD.org/src/commit/?id=aa9ad4d484eff42dfd7461fdfcc5d32a03922e8e
commit aa9ad4d484eff42dfd7461fdfcc5d32a03922e8e
Author: Kyle Evans <kevans@FreeBSD.org>
AuthorDate: 2023-11-22 04:45:42 +0000
Commit: Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2023-12-15 00:59:12 +0000
lockf: correct omission in the usage statement
The -w flag was added without being noted in the usage statement; fix
that now.
While we're here, re-sort the getopt() string.
Reviewed by: 0mp, allanjude, des
Sponsored by: Klara, Inc.
(cherry picked from commit 35095fd23f071d03633312b91a5b460eaf811efa)
---
usr.bin/lockf/lockf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/usr.bin/lockf/lockf.c b/usr.bin/lockf/lockf.c
index 3caf8941bdf6..6ca317887cb1 100644
--- a/usr.bin/lockf/lockf.c
+++ b/usr.bin/lockf/lockf.c
@@ -62,7 +62,7 @@ main(int argc, char **argv)
silent = keep = 0;
flags = O_CREAT | O_RDONLY;
waitsec = -1; /* Infinite. */
- while ((ch = getopt(argc, argv, "sknt:w")) != -1) {
+ while ((ch = getopt(argc, argv, "knst:w")) != -1) {
switch (ch) {
case 'k':
keep = 1;
@@ -224,7 +224,7 @@ usage(void)
{
fprintf(stderr,
- "usage: lockf [-kns] [-t seconds] file command [arguments]\n");
+ "usage: lockf [-knsw] [-t seconds] file command [arguments]\n");
exit(EX_USAGE);
}