udev: link-config - use proper return values

Not sure if -ENOENT is the correct return value for when no persistent network
name is set, but couldn't think of anything better.
This commit is contained in:
Tom Gundersen
2013-10-29 16:12:12 +01:00
parent a12fa4204d
commit 55428d84f3
+2 -2
View File
@@ -365,13 +365,13 @@ static int get_mac(struct udev_device *device, bool want_random, struct ether_ad
if (!name) {
name = udev_device_get_property_value(device, "ID_NET_NAME_PATH");
if (!name)
return -1;
return -ENOENT;
}
}
/* fetch some persistent data unique to this machine */
r = sd_id128_get_machine(&machine);
if (r < 0)
return -1;
return r;
/* combine the data */
seed_str = strappenda(name, sd_id128_to_string(machine, machineid_buf));