diff options
Diffstat (limited to 'networking')
-rw-r--r-- | networking/nameif.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/networking/nameif.c b/networking/nameif.c index cd18b4c18..f3b927158 100644 --- a/networking/nameif.c +++ b/networking/nameif.c | |||
@@ -36,7 +36,7 @@ | |||
36 | #include "busybox.h" | 36 | #include "busybox.h" |
37 | 37 | ||
38 | /* take from linux/sockios.h */ | 38 | /* take from linux/sockios.h */ |
39 | #define SIOCSIFNAME 0x8923 /* set interface name */ | 39 | #define SIOCSIFNAME 0x8923 /* set interface name */ |
40 | 40 | ||
41 | /* Octets in one ethernet addr, from <linux/if_ether.h> */ | 41 | /* Octets in one ethernet addr, from <linux/if_ether.h> */ |
42 | #define ETH_ALEN 6 | 42 | #define ETH_ALEN 6 |
@@ -101,13 +101,8 @@ int nameif_main(int argc, char **argv) | |||
101 | int if_index = 1; | 101 | int if_index = 1; |
102 | mactable_t *ch; | 102 | mactable_t *ch; |
103 | 103 | ||
104 | static struct option opts[] = { | ||
105 | {"syslog", 0, NULL, 's'}, | ||
106 | {"configfile", 1, NULL, 'c'}, | ||
107 | {NULL}, | ||
108 | }; | ||
109 | 104 | ||
110 | while ((opt = getopt_long(argc, argv, "c:s", opts, NULL)) != -1) { | 105 | while ((opt = getopt(argc, argv, "c:s")) != -1) { |
111 | switch (opt) { | 106 | switch (opt) { |
112 | case 'c': | 107 | case 'c': |
113 | fname = optarg; | 108 | fname = optarg; |
@@ -152,8 +147,7 @@ int nameif_main(int argc, char **argv) | |||
152 | ch = xcalloc(1, sizeof(mactable_t)); | 147 | ch = xcalloc(1, sizeof(mactable_t)); |
153 | ch->ifname = xstrndup(line_ptr, name_length); | 148 | ch->ifname = xstrndup(line_ptr, name_length); |
154 | if (name_length > IF_NAMESIZE) | 149 | if (name_length > IF_NAMESIZE) |
155 | serror("interface name `%s' too long", | 150 | serror("interface name `%s' too long", ch->ifname); |
156 | ch->ifname); | ||
157 | line_ptr += name_length; | 151 | line_ptr += name_length; |
158 | line_ptr += strspn(line_ptr, " \t"); | 152 | line_ptr += strspn(line_ptr, " \t"); |
159 | name_length = strspn(line_ptr, "0123456789ABCDEFabcdef:"); | 153 | name_length = strspn(line_ptr, "0123456789ABCDEFabcdef:"); |