X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=networking%2Fnameif.c;h=f3b9271584373b2ed1bdfa2e363d36d1528a171f;hb=3d2405cfb30ccc8113839c1be3ee265597b857a6;hp=cd18b4c18d2f8f4b0a86614c4cec193130f2337c;hpb=77c60e5c667e1293f92b65056f107c92edcc3965;p=oweals%2Fbusybox.git 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 @@ #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 */ #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:");