summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2004-10-20 21:26:44 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2004-10-20 21:26:44 +0000
commit5adf6fa0a170578e6fece47b71ce43fc17d0f36e (patch)
tree3c4f26b58b70b95b9e3070fd8668fdad5e7791a6 /sbin
parentcd99779d3b1ebabc8b4cd26f4c2f84e5456b023b (diff)
bit of roto-tilling
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ipwcontrol/ipwcontrol.c8
-rw-r--r--sbin/iwicontrol/iwicontrol.812
-rw-r--r--sbin/iwicontrol/iwicontrol.c14
3 files changed, 17 insertions, 17 deletions
diff --git a/sbin/ipwcontrol/ipwcontrol.c b/sbin/ipwcontrol/ipwcontrol.c
index 21efe261c99..98ee21372c8 100644
--- a/sbin/ipwcontrol/ipwcontrol.c
+++ b/sbin/ipwcontrol/ipwcontrol.c
@@ -1,4 +1,4 @@
-/* $Id: ipwcontrol.c,v 1.2 2004/10/20 21:01:38 deraadt Exp $ */
+/* $Id: ipwcontrol.c,v 1.3 2004/10/20 21:26:43 deraadt Exp $ */
/*-
* Copyright (c) 2004
@@ -28,7 +28,7 @@
*/
#ifndef lint
-static char rcsid[] = "$Id: ipwcontrol.c,v 1.2 2004/10/20 21:01:38 deraadt Exp $";
+static char rcsid[] = "$Id: ipwcontrol.c,v 1.3 2004/10/20 21:26:43 deraadt Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -76,6 +76,8 @@ main(int argc, char **argv)
iface = "ipw0";
else if (argc > 1 && argv[1][0] != '-') {
iface = argv[1];
+ memcpy(&argv[1], &argv[2], argc * sizeof(char *));
+ argc--;
}
while ((ch = getopt(argc, argv, "f:kr")) != -1) {
@@ -108,7 +110,7 @@ usage(void)
extern char *__progname;
fprintf(stderr,
- "usage: %s [interface] [-i interface] [-f firmware] [-kr]\n",
+ "usage: %s [interface] [-f firmware] [-kr]\n",
__progname);
exit(EX_USAGE);
diff --git a/sbin/iwicontrol/iwicontrol.8 b/sbin/iwicontrol/iwicontrol.8
index 4bcd60f64e7..773744176f0 100644
--- a/sbin/iwicontrol/iwicontrol.8
+++ b/sbin/iwicontrol/iwicontrol.8
@@ -1,4 +1,4 @@
-.\" $Id: iwicontrol.8,v 1.2 2004/10/20 21:01:37 deraadt Exp $
+.\" $Id: iwicontrol.8,v 1.3 2004/10/20 21:26:43 deraadt Exp $
.\"
.\" Copyright (c) 2004
.\" Damien Bergamini <damien.bergamini@free.fr>. All rights reserved.
@@ -33,8 +33,8 @@
.Nd configure Intel(R) PRO/Wireless 2200BG/2915ABG network adapters
.Sh SYNOPSIS
.Nm
-.Op Fl i Ar interface
-.OP Fl d Ar directory
+.Op Ar interface
+.Op Fl d Ar directory
.Op Fl m Ar bss|ibss
.Op Fl k
.Op Fl r
@@ -54,10 +54,12 @@ The options are as follows:
.Bl -tag -width indent
.It Fl i Ar interface
Displays adapter's internal statistics.
-.It Fl d Ar directory Fl m Ar bss|ibss
+.It Fl d Ar directory
Download firmware binary image to the adapter. The image is read from the
.Ar directory
-directory. By default, the firmware binary image for BSS (aka infrastructure
+directory.
+.It Fl m Ar bss|ibss
+By default, the firmware binary image for BSS (aka infrastructure
mode) mode is downloaded unless the
.Fl m
flag is given.
diff --git a/sbin/iwicontrol/iwicontrol.c b/sbin/iwicontrol/iwicontrol.c
index 289f7e70144..73536ebf62a 100644
--- a/sbin/iwicontrol/iwicontrol.c
+++ b/sbin/iwicontrol/iwicontrol.c
@@ -1,4 +1,4 @@
-/* $Id: iwicontrol.c,v 1.2 2004/10/20 21:01:37 deraadt Exp $ */
+/* $Id: iwicontrol.c,v 1.3 2004/10/20 21:26:43 deraadt Exp $ */
/*-
* Copyright (c) 2004
@@ -85,22 +85,18 @@ main(int argc, char **argv)
iface = "iwi0";
else if (argc > 1 && argv[1][0] != '-') {
iface = argv[1];
- optind++;
+ memcpy(&argv[1], &argv[2], argc * sizeof(char *));
+ argc--;
}
while ((ch = getopt(argc, argv, "d:i:km:r")) != -1) {
- if (ch != 'i')
- noflag = 0;
+ noflag = 0;
switch (ch) {
case 'd':
path = optarg;
break;
- case 'i':
- iface = optarg;
- break;
-
case 'k':
kflag = 1;
break;
@@ -145,7 +141,7 @@ usage(void)
extern char *__progname;
fprintf(stderr,
- "usage: %s [interface] [-i interface] [-d path] [-kr]\n",
+ "usage: %s [interface] [-d path] [-kr]\n",
__progname);
exit(EX_USAGE);