]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Check if udev has actually initialized the interface rather than just detecting if...
authorRoy Marples <roy@marples.name>
Tue, 10 Sep 2013 08:52:45 +0000 (08:52 +0000)
committerRoy Marples <roy@marples.name>
Tue, 10 Sep 2013 08:52:45 +0000 (08:52 +0000)
dev/udev.c

index 19243fb5be5072749a6d180fd00ece8f35d151cc..56f790f6ed1024d8a00ca80e7514c8d4b12dcf0c 100644 (file)
@@ -46,8 +46,11 @@ libudev_settled(const char *ifname)
        int r;
 
        device = udev_device_new_from_subsystem_sysname(udev, "net", ifname);
-       r = device ? 1 : 0;
-       udev_device_unref(device);
+       if (device) {
+               r = udev_device_get_is_initialized(device);
+               udev_device_unref(device);
+       } else
+               r = 0;
        return r;
 }