const char *id;
const char *devpath;
const char *devpath_old;
+ const char *devnode;
usec_t retry_again_next_usec;
usec_t retry_again_timeout_usec;
devpath_conflict(event->devpath, loop_event->devpath_old) ||
devpath_conflict(event->devpath_old, loop_event->devpath))
break;
+
+ if (event->devnode && streq_ptr(event->devnode, loop_event->devnode))
+ break;
}
assert(loop_event);
}
static int event_queue_insert(Manager *manager, sd_device *dev) {
- const char *devpath, *devpath_old = NULL, *id = NULL;
+ const char *devpath, *devpath_old = NULL, *id = NULL, *devnode = NULL;
sd_device_action_t action;
uint64_t seqnum;
Event *event;
if (r < 0 && r != -ENOENT)
return r;
+ r = sd_device_get_devname(dev, &devnode);
+ if (r < 0 && r != -ENOENT)
+ return r;
+
event = new(Event, 1);
if (!event)
return -ENOMEM;
.id = id,
.devpath = devpath,
.devpath_old = devpath_old,
+ .devnode = devnode,
.state = EVENT_QUEUED,
};