mixer(8): Add -h option to show usage.
Differential Revision: https://reviews.freebsd.org/D32508 Submitted by: christos@ Sponsored by: NVIDIA Networking
This commit is contained in:
parent
899a3b38f5
commit
aa92785a5b
@ -65,7 +65,7 @@ main(int argc, char *argv[])
|
|||||||
int aflag = 0, dflag = 0, oflag = 0, sflag = 0;
|
int aflag = 0, dflag = 0, oflag = 0, sflag = 0;
|
||||||
int ch;
|
int ch;
|
||||||
|
|
||||||
while ((ch = getopt(argc, argv, "ad:f:os")) != -1) {
|
while ((ch = getopt(argc, argv, "ad:f:hos")) != -1) {
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case 'a':
|
case 'a':
|
||||||
aflag = 1;
|
aflag = 1;
|
||||||
@ -85,6 +85,7 @@ main(int argc, char *argv[])
|
|||||||
case 's':
|
case 's':
|
||||||
sflag = 1;
|
sflag = 1;
|
||||||
break;
|
break;
|
||||||
|
case 'h': /* FALLTROUGH */
|
||||||
case '?':
|
case '?':
|
||||||
default:
|
default:
|
||||||
usage();
|
usage();
|
||||||
@ -175,7 +176,8 @@ static void __dead2
|
|||||||
usage(void)
|
usage(void)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "usage: %1$s [-f device] [-d unit] [-os] [dev[.control[=value]]] ...\n"
|
fprintf(stderr, "usage: %1$s [-f device] [-d unit] [-os] [dev[.control[=value]]] ...\n"
|
||||||
" %1$s [-d unit] [-os] -a\n", getprogname());
|
" %1$s [-d unit] [-os] -a\n"
|
||||||
|
" %1$s -h\n", getprogname());
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user