summaryrefslogtreecommitdiff
path: root/src/udev
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2013-10-29 16:05:27 +0100
committerTom Gundersen <teg@jklm.no>2013-10-29 16:12:12 +0100
commit55428d84f31b52da1c50b7469f14e15740547f20 (patch)
tree3eaa97a0a9b997184ea5ff6a861a982765473496 /src/udev
parenta12fa4204d7da3256537222294d02c8d340f2650 (diff)
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.
Diffstat (limited to 'src/udev')
-rw-r--r--src/udev/net/link-config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c
index cc8ff6fda7..985fc7d47a 100644
--- a/src/udev/net/link-config.c
+++ b/src/udev/net/link-config.c
@@ -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));