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;
}
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++);
} 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;
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");