mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-07 22:21:45 +00:00
core: don't change removed devices to state "tentative"
Commit628c89cintroduced the "tentative" device state, which caused devices to go from "plugged" to "tentative" on a remove uevent. This breaks the cleanup of stale mounts (see commit3b48ce4), as that only applies to "dead" devices. The "tentative" state only really makes sense on adding a device when we don't know where it was coming from (i. e. not from udev). But when we get a device removal from udev we definitively know that it's gone, so change the device state back to "dead" as before628c89c.
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
84a122a008
commit
496068a828
+1
-1
@@ -419,7 +419,7 @@ static void device_update_found_one(Device *d, bool add, DeviceFound found, bool
|
||||
if (now) {
|
||||
if (d->found & DEVICE_FOUND_UDEV)
|
||||
device_set_state(d, DEVICE_PLUGGED);
|
||||
else if (d->found != DEVICE_NOT_FOUND)
|
||||
else if (add && d->found != DEVICE_NOT_FOUND)
|
||||
device_set_state(d, DEVICE_TENTATIVE);
|
||||
else
|
||||
device_set_state(d, DEVICE_DEAD);
|
||||
|
||||
Reference in New Issue
Block a user