Commit 547c41de authored by Alessandro Rubini's avatar Alessandro Rubini

rvlan: change error management at init time

When we get one of the very-unlikely errors, we should countinue to
the next interface rather than return to the caller.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 5eb5f946
......@@ -425,13 +425,13 @@ static int rvlan_enumerate_devices(char *prefix)
if (!f) {
fprintf(stderr, "%s: open(%s): %s\n", prgname, path,
strerror(errno));
return -1;
continue;
}
ret = fscanf(f, "%i", &dev->ifindex);
fclose(f);
if (ret != 1) {
fprintf(stderr, "%s: %s: wrong data\n", prgname, path);
return -1;
continue;
}
dev->chosen_vlan = rvlan_auth_vlan;
......@@ -485,7 +485,7 @@ int rvlan_initial_check(void)
if (!f) {
fprintf(stderr, "%s: %s: %s\n", prgname, path,
strerror(errno));
return -1;
continue;
}
ret = fscanf(f, "%s", upbuf);
up = (upbuf[0] == 'u');
......
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