9
0
Fork 0

Merge branch 'for-next/ifup'

This commit is contained in:
Sascha Hauer 2014-05-05 11:05:51 +02:00
commit 80f15899b1
2 changed files with 8 additions and 3 deletions

View File

@ -14,3 +14,5 @@ serverip=
#ethaddr=xx:xx:xx:xx:xx:xx
# put code to discover eth0 (i.e. 'usb') to /env/network/eth0-discover
exit 0

View File

@ -31,7 +31,6 @@ static char *vars[] = {
"netmask",
"gateway",
"serverip",
"ethaddr",
};
static int eth_set_param(struct device_d *dev, const char *param)
@ -70,14 +69,18 @@ int ifup(const char *name, unsigned flags)
cmd_discover = asprintf("/env/network/%s-discover", name);
ret = run_command(cmd);
if (ret)
if (ret) {
pr_err("Running '%s' failed with %d\n", cmd, ret);
goto out;
}
ret = stat(cmd_discover, &s);
if (!ret) {
ret = run_command(cmd_discover);
if (ret)
if (ret) {
pr_err("Running '%s' failed with %d\n", cmd, ret);
goto out;
}
}
dev = get_device_by_name(name);