summaryrefslogtreecommitdiff
path: root/networking/nameif.c
diff options
context:
space:
mode:
authorGlenn L McGrath2003-01-19 13:34:21 +0000
committerGlenn L McGrath2003-01-19 13:34:21 +0000
commita9adef0394b8f6f600150e3c8d288f85e72d7f49 (patch)
treed9482d2ce435da124d28fb14cd1277a4c87e6efe /networking/nameif.c
parente6ae6e3d39443606f9f101b9c6ef0070f3c863a1 (diff)
downloadbusybox-a9adef0394b8f6f600150e3c8d288f85e72d7f49.zip
busybox-a9adef0394b8f6f600150e3c8d288f85e72d7f49.tar.gz
Dont use getopt_long, minor usage changes, patch by Nick Fedchik
Diffstat (limited to 'networking/nameif.c')
-rw-r--r--networking/nameif.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/networking/nameif.c b/networking/nameif.c
index cd18b4c..f3b9271 100644
--- a/networking/nameif.c
+++ b/networking/nameif.c
@@ -36,7 +36,7 @@
#include "busybox.h"
/* take from linux/sockios.h */
-#define SIOCSIFNAME 0x8923 /* set interface name */
+#define SIOCSIFNAME 0x8923 /* set interface name */
/* Octets in one ethernet addr, from <linux/if_ether.h> */
#define ETH_ALEN 6
@@ -101,13 +101,8 @@ int nameif_main(int argc, char **argv)
int if_index = 1;
mactable_t *ch;
- static struct option opts[] = {
- {"syslog", 0, NULL, 's'},
- {"configfile", 1, NULL, 'c'},
- {NULL},
- };
- while ((opt = getopt_long(argc, argv, "c:s", opts, NULL)) != -1) {
+ while ((opt = getopt(argc, argv, "c:s")) != -1) {
switch (opt) {
case 'c':
fname = optarg;
@@ -152,8 +147,7 @@ int nameif_main(int argc, char **argv)
ch = xcalloc(1, sizeof(mactable_t));
ch->ifname = xstrndup(line_ptr, name_length);
if (name_length > IF_NAMESIZE)
- serror("interface name `%s' too long",
- ch->ifname);
+ serror("interface name `%s' too long", ch->ifname);
line_ptr += name_length;
line_ptr += strspn(line_ptr, " \t");
name_length = strspn(line_ptr, "0123456789ABCDEFabcdef:");