chiark / gitweb /
udev: link-config - use proper return values
[elogind.git] / src / udev / net / link-config.c
index cc8ff6fda781625ce05ec5b19c973dac25739355..985fc7d47a485765c983961894283ae5894b305c 100644 (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));