Commit c8d4f437 authored by Jiri Popelka's avatar Jiri Popelka

The return value of nameif was wrong

Steps to Reproduce:
/sbin/nameif eth1 00:00:10:10:11:11; echo $?

Actual Results:
interface 'eth1' not found
0

Expected Results:
interface 'eth1' not found
1
parent 81d60e09
......@@ -210,6 +210,7 @@ int main(int ac, char **av)
int linenum;
char *line = NULL;
size_t linel = 0;
int ret = 0;
for (;;) {
int c = getopt_long(ac,av,"c:s",lopt,NULL);
......@@ -288,13 +289,15 @@ int main(int ac, char **av)
while (clist) {
struct change *ch = clist;
clist = clist->next;
if (!ch->found)
if (!ch->found){
warning(_("interface '%s' not found"), ch->ifname);
ret = 1;
}
free(ch);
}
if (use_syslog)
closelog();
return 0;
return ret;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment