diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-04-24 12:29:05 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-04-24 12:29:05 +0200 |
commit | f62009410a72f5a89bfb8fdd7e48d9d472a6887b (patch) | |
tree | 6de683ec5cf4f54460c8a282f652667280af800c /src/core/device.h | |
parent | f06db33455f5134c5c94b71a5b1d94cc9d0d630c (diff) |
device: rework how we enter tentative state
This reworks how we enter tentative state and does so only when a device
was previously not announced via udev. The previous check actually just
checked whether a new state bit was set, which is not correct.
Also, to be able to reliably maintain the tentative state across daemon
reloads, we need to serialize and deserialize it.
Diffstat (limited to 'src/core/device.h')
-rw-r--r-- | src/core/device.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/device.h b/src/core/device.h index 9f46e08953..10ab113176 100644 --- a/src/core/device.h +++ b/src/core/device.h @@ -23,7 +23,6 @@ typedef struct Device Device; - /* We simply watch devices, we cannot plug/unplug them. That * simplifies the state engine greatly */ typedef enum DeviceState { @@ -52,7 +51,7 @@ struct Device { devices for the same sysfs path. We chain them up here. */ LIST_FIELDS(struct Device, same_sysfs); - DeviceState state; + DeviceState state, deserialized_state; }; extern const UnitVTable device_vtable; |