diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-11-26 13:36:35 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-11-26 13:36:35 +0000 |
commit | 8a978ed56b75a0f4fd0602dbe656a827baeedc14 (patch) | |
tree | 10724ed6fd520333d88f6bc187fc477addb97a86 /usr.bin/mixerctl | |
parent | b2e70517f47cbe6832a7f91cc516866c53bc2760 (diff) |
if no arguments given, assume a nice default; ok miod jakemsr deanna
Diffstat (limited to 'usr.bin/mixerctl')
-rw-r--r-- | usr.bin/mixerctl/mixerctl.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/mixerctl/mixerctl.c b/usr.bin/mixerctl/mixerctl.c index 887105bc60d..a10b8d47e62 100644 --- a/usr.bin/mixerctl/mixerctl.c +++ b/usr.bin/mixerctl/mixerctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mixerctl.c,v 1.25 2007/09/27 21:55:54 sobrado Exp $ */ +/* $OpenBSD: mixerctl.c,v 1.26 2007/11/26 13:36:34 deraadt Exp $ */ /* $NetBSD: mixerctl.c,v 1.11 1998/04/27 16:55:23 augustss Exp $ */ /* @@ -282,7 +282,6 @@ main(int argc, char **argv) case 't': tflag = 1; break; - case '?': default: usage(); } @@ -290,6 +289,9 @@ main(int argc, char **argv) argc -= optind; argv += optind; + if (argc == 0 && tflag == 0) + aflag++; + if ((fd = open(file, O_RDWR)) == -1) if ((fd = open(file, O_RDONLY)) == -1) err(1, "%s", file); @@ -400,7 +402,7 @@ usage(void) extern char *__progname; /* from crt0.o */ fprintf(stderr, - "usage: %s [-nv] [-f file] -a\n" + "usage: %s [-anv] [-f file]\n" " %s [-nv] [-f file] name ...\n" " %s [-qt] [-f file] name ...\n" " %s [-q] [-f file] name=value ...\n", |