wget: add TODO
[oweals/busybox.git] / networking / nameif.c
index 3fa257263a8b2a254266be49a9a3232048607ff4..52aad287375b626f27415bf64b2b27250f412b9d 100644 (file)
@@ -65,8 +65,8 @@ int nameif_main(int argc, char **argv)
        int if_index = 1;
        mactable_t *ch;
 
-       if (1 & bb_getopt_ulflags(argc, argv, "sc:", &fname)) {
-               openlog(bb_applet_name, 0, LOG_LOCAL0);
+       if (1 & getopt32(argc, argv, "sc:", &fname)) {
+               openlog(applet_name, 0, LOG_LOCAL0);
                logmode = LOGMODE_SYSLOG;
        }
 
@@ -78,7 +78,7 @@ int nameif_main(int argc, char **argv)
 
                while (*a) {
                        if (strlen(*a) > IF_NAMESIZE)
-                               bb_error_msg_and_die("interface name `%s' "
+                               bb_error_msg_and_die("interface name '%s' "
                                            "too long", *a);
                        ch = xzalloc(sizeof(mactable_t));
                        ch->ifname = xstrdup(*a++);
@@ -91,7 +91,7 @@ int nameif_main(int argc, char **argv)
        } else {
                ifh = xfopen(fname, "r");
 
-               while ((line = bb_get_line_from_file(ifh)) != NULL) {
+               while ((line = xmalloc_fgets(ifh)) != NULL) {
                        char *line_ptr;
                        size_t name_length;
 
@@ -104,7 +104,7 @@ int nameif_main(int argc, char **argv)
                        ch = xzalloc(sizeof(mactable_t));
                        ch->ifname = xstrndup(line_ptr, name_length);
                        if (name_length > IF_NAMESIZE)
-                               bb_error_msg_and_die("interface name `%s' "
+                               bb_error_msg_and_die("interface name '%s' "
                                                "too long", ch->ifname);
                        line_ptr += name_length;
                        line_ptr += strspn(line_ptr, " \t");