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.
Differential Revision:	https://reviews.freebsd.org/D42712
This commit is contained in:
Kyle Evans 2023-11-21 22:45:42 -06:00
parent 3041e6950d
commit 35095fd23f

View file

@ -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;
@ -228,7 +228,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);
}