[BusyBox-cvs] busybox/networking nameif.c,1.5,1.6
Glenn McGrath
bug1 at busybox.net
Sun Jan 19 13:34:26 UTC 2003
Update of /var/cvs/busybox/networking
In directory winder:/tmp/cvs-serv21055/networking
Modified Files:
nameif.c
Log Message:
Dont use getopt_long, minor usage changes, patch by Nick Fedchik
Index: nameif.c
===================================================================
RCS file: /var/cvs/busybox/networking/nameif.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- nameif.c 16 Jan 2003 11:37:57 -0000 1.5
+++ nameif.c 19 Jan 2003 13:34:21 -0000 1.6
@@ -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 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 @@
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:");
More information about the busybox-cvs
mailing list