summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbin/ipwcontrol/ipwcontrol.88
-rw-r--r--sbin/ipwcontrol/ipwcontrol.c28
-rw-r--r--sbin/iwicontrol/iwicontrol.84
-rw-r--r--sbin/iwicontrol/iwicontrol.c12
4 files changed, 20 insertions, 32 deletions
diff --git a/sbin/ipwcontrol/ipwcontrol.8 b/sbin/ipwcontrol/ipwcontrol.8
index 030dd8df502..78f02ccfb8b 100644
--- a/sbin/ipwcontrol/ipwcontrol.8
+++ b/sbin/ipwcontrol/ipwcontrol.8
@@ -1,4 +1,4 @@
-.\" $Id: ipwcontrol.8,v 1.1 2004/10/20 12:50:48 deraadt Exp $
+.\" $Id: ipwcontrol.8,v 1.2 2004/10/20 21:01:38 deraadt Exp $
.\"
.\" Copyright (c) 2004
.\" Damien Bergamini <damien.bergamini@free.fr>. All rights reserved.
@@ -33,8 +33,8 @@
.Nd configure Intel PRO/Wireless 2100 network adapter
.Sh SYNOPSIS
.Nm
-.Op Fl i Ar iface
-.Op f Ar firmware
+.Op Fl i Ar interface
+.Op Fl f Ar firmware
.Op Fl k
.Op Fl r
.Sh DESCRIPTION
@@ -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
Display adapter's internal statistics.
.It Fl f Ar firmware
Download firmware binary image
diff --git a/sbin/ipwcontrol/ipwcontrol.c b/sbin/ipwcontrol/ipwcontrol.c
index 887db67817c..21efe261c99 100644
--- a/sbin/ipwcontrol/ipwcontrol.c
+++ b/sbin/ipwcontrol/ipwcontrol.c
@@ -1,4 +1,4 @@
-/* $Id: ipwcontrol.c,v 1.1 2004/10/20 12:50:48 deraadt Exp $ */
+/* $Id: ipwcontrol.c,v 1.2 2004/10/20 21:01:38 deraadt Exp $ */
/*-
* Copyright (c) 2004
@@ -28,7 +28,7 @@
*/
#ifndef lint
-static char rcsid[] = "$Id: ipwcontrol.c,v 1.1 2004/10/20 12:50:48 deraadt Exp $";
+static char rcsid[] = "$Id: ipwcontrol.c,v 1.2 2004/10/20 21:01:38 deraadt Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -72,21 +72,11 @@ main(int argc, char **argv)
int ch;
char *iface;
- opterr = 0;
- ch = getopt(argc, argv, "i:");
- if (ch == 'i') {
- iface = optarg;
- } else {
- if (argc > 1 && argv[1][0] != '-') {
- iface = argv[1];
- optind = 2;
- } else {
- iface = "ipw0";
- optind = 1;
- }
- optreset = 1;
+ if (argc == 1)
+ iface = "ipw0";
+ else if (argc > 1 && argv[1][0] != '-') {
+ iface = argv[1];
}
- opterr = 1;
while ((ch = getopt(argc, argv, "f:kr")) != -1) {
switch (ch) {
@@ -117,10 +107,8 @@ usage(void)
{
extern char *__progname;
- (void)fprintf(stderr, "usage: %s -i iface\n"
- "\t%s -i iface -f firmware\n"
- "\t%s -i iface -k\n"
- "\t%s -i iface -r\n", __progname, __progname, __progname,
+ fprintf(stderr,
+ "usage: %s [interface] [-i interface] [-f firmware] [-kr]\n",
__progname);
exit(EX_USAGE);
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);