sd_device *dev;
+ sd_device_action_t action;
uint64_t seqnum;
uint64_t blocker_seqnum;
r = event_is_blocked(event);
if (r > 0)
continue;
- if (r < 0) {
- sd_device_action_t a = _SD_DEVICE_ACTION_INVALID;
-
- (void) sd_device_get_action(event->dev, &a);
+ if (r < 0)
log_device_warning_errno(event->dev, r,
"Failed to check dependencies for event (SEQNUM=%"PRIu64", ACTION=%s), "
"assuming there is no blocking event, ignoring: %m",
event->seqnum,
- strna(device_action_to_string(a)));
- }
+ strna(device_action_to_string(event->action)));
r = event_run(event);
if (r <= 0) /* 0 means there are no idle workers. Let's escape from the loop. */
}
static int event_queue_insert(Manager *manager, sd_device *dev) {
+ sd_device_action_t action;
uint64_t seqnum;
Event *event;
int r;
if (r < 0)
return r;
+ r = sd_device_get_action(dev, &action);
+ if (r < 0)
+ return r;
+
event = new(Event, 1);
if (!event)
return -ENOMEM;
.manager = manager,
.dev = sd_device_ref(dev),
.seqnum = seqnum,
+ .action = action,
.state = EVENT_QUEUED,
};