From: Lennart Poettering Date: Thu, 13 Dec 2018 17:32:03 +0000 (+0100) Subject: core: make sure to recheck current udev tag "systemd" before considering a device... X-Git-Tag: v247-rc1~314^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=242c1c075aa284c8a8657c5aca36147f528146ba;p=thirdparty%2Fsystemd.git core: make sure to recheck current udev tag "systemd" before considering a device ready Let's ensure that a device once tagged can become active/inactive simply by toggling the current tag. Note that this means that a device once tagged with "systemd" will always have a matching .device unit. However, the active/inactive state of the unit reflects whether it is currently tagged that way (and doesn't have SYSTEMD_READY=0 set). Fixes: #7587 --- diff --git a/src/core/device.c b/src/core/device.c index 5b8134159a8..53bc549bd36 100644 --- a/src/core/device.c +++ b/src/core/device.c @@ -736,6 +736,10 @@ static bool device_is_ready(sd_device *dev) { if (device_is_renaming(dev) > 0) return false; + /* Is it really tagged as 'systemd' right now? */ + if (sd_device_has_current_tag(dev, "systemd") <= 0) + return false; + if (sd_device_get_property_value(dev, "SYSTEMD_READY", &ready) < 0) return true;