chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update TODO
[elogind.git]
/
src
/
device.c
diff --git
a/src/device.c
b/src/device.c
index b36bfc1ad185d10b50dd03ec797f5b74dc8634bc..b9d8a2b9cf4a6444c5ee8ccf1563a1f81dddab3d 100644
(file)
--- a/
src/device.c
+++ b/
src/device.c
@@
-92,7
+92,7
@@
static void device_set_state(Device *d, DeviceState state) {
device_state_to_string(old_state),
device_state_to_string(state));
device_state_to_string(old_state),
device_state_to_string(state));
- unit_notify(UNIT(d), state_translation_table[old_state], state_translation_table[state]);
+ unit_notify(UNIT(d), state_translation_table[old_state], state_translation_table[state]
, true
);
}
static int device_coldplug(Unit *u) {
}
static int device_coldplug(Unit *u) {
@@
-526,7
+526,7
@@
fail:
void device_fd_event(Manager *m, int events) {
struct udev_device *dev;
int r;
void device_fd_event(Manager *m, int events) {
struct udev_device *dev;
int r;
- const char *action;
+ const char *action
, *ready
;
assert(m);
assert(m);
@@
-552,7
+552,9
@@
void device_fd_event(Manager *m, int events) {
goto fail;
}
goto fail;
}
- if (streq(action, "remove")) {
+ ready = udev_device_get_property_value(dev, "SYSTEMD_READY");
+
+ if (streq(action, "remove") || (ready && parse_boolean(ready) == 0)) {
if ((r = device_process_removed_device(m, dev)) < 0) {
log_error("Failed to process udev device event: %s", strerror(-r));
goto fail;
if ((r = device_process_removed_device(m, dev)) < 0) {
log_error("Failed to process udev device event: %s", strerror(-r));
goto fail;