From bf5332d2bf2a1acbba9daacf40570a4addbd3411 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 18 Dec 2013 03:37:26 +0100 Subject: core,logind,networkd: don't pick up devices from udev before they finished udev initialization Managers shouldn't pick up the devices the manage before udev finished initialization, hence check explicitly for that. --- src/core/device.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/core') diff --git a/src/core/device.c b/src/core/device.c index 4ff7c37238..70fac1b8b7 100644 --- a/src/core/device.c +++ b/src/core/device.c @@ -303,6 +303,10 @@ static int device_process_new_device(Manager *m, struct udev_device *dev) { assert(m); + /* Don't pick up devices before udev finished initialization for them */ + if (!udev_device_get_is_initialized(dev)) + return 0; + sysfs = udev_device_get_syspath(dev); if (!sysfs) return 0; -- cgit v1.2.3-54-g00ecf