diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-10-20 21:01:39 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-10-20 21:01:39 +0000 |
commit | 1cec61d6f96410096223dcf58cfdb8f463996da2 (patch) | |
tree | 92fd78fa92639ed3357e72d3b9c89277f125df22 /sbin/iwicontrol | |
parent | c3258e55ecb50c82fd6bf59a1f04cd519ecae2ad (diff) |
make more like wicontrol for argument parsing
Diffstat (limited to 'sbin/iwicontrol')
-rw-r--r-- | sbin/iwicontrol/iwicontrol.8 | 4 | ||||
-rw-r--r-- | sbin/iwicontrol/iwicontrol.c | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/sbin/iwicontrol/iwicontrol.8 b/sbin/iwicontrol/iwicontrol.8 index d07463bb92b..4bcd60f64e7 100644 --- a/sbin/iwicontrol/iwicontrol.8 +++ b/sbin/iwicontrol/iwicontrol.8 @@ -1,4 +1,4 @@ -.\" $Id: iwicontrol.8,v 1.1 2004/10/20 12:50:48 deraadt Exp $ +.\" $Id: iwicontrol.8,v 1.2 2004/10/20 21:01:37 deraadt Exp $ .\" .\" Copyright (c) 2004 .\" Damien Bergamini <damien.bergamini@free.fr>. All rights reserved. @@ -52,7 +52,7 @@ instead. .Sh OPTIONS The options are as follows: .Bl -tag -width indent -.It Fl i Ar iface +.It Fl i Ar interface Displays adapter's internal statistics. .It Fl d Ar directory Fl m Ar bss|ibss Download firmware binary image to the adapter. The image is read from the diff --git a/sbin/iwicontrol/iwicontrol.c b/sbin/iwicontrol/iwicontrol.c index e7bc862b8f6..289f7e70144 100644 --- a/sbin/iwicontrol/iwicontrol.c +++ b/sbin/iwicontrol/iwicontrol.c @@ -1,4 +1,4 @@ -/* $Id: iwicontrol.c,v 1.1 2004/10/20 12:50:48 deraadt Exp $ */ +/* $Id: iwicontrol.c,v 1.2 2004/10/20 21:01:37 deraadt Exp $ */ /*- * Copyright (c) 2004 @@ -81,7 +81,9 @@ main(int argc, char **argv) char *iface = NULL, *mode = NULL, *path = NULL; int noflag = 1, kflag = 0, rflag = 0; - if (argc > 1 && argv[1][0] != '-') { + if (argc == 1) + iface = "iwi0"; + else if (argc > 1 && argv[1][0] != '-') { iface = argv[1]; optind++; } @@ -142,10 +144,8 @@ usage(void) { extern char *__progname; - (void)fprintf(stderr, "usage: %s iface\n" - "\t%s iface -d path [-m bss|ibss]\n" - "\t%s iface -k\n" - "\t%s iface -r\n", __progname, __progname, __progname, + fprintf(stderr, + "usage: %s [interface] [-i interface] [-d path] [-kr]\n", __progname); exit(EX_USAGE); |