X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fudev%2Fudevd.c;h=9bbc8ec8ad6c7587cbea4dadd8aea7f8339b5cd6;hp=b4fc624db3d45389665b76d3ba8f333f302cfe13;hb=ea6039a30929ff845859ed601594546d71894d84;hpb=01ed0e2307f3b889b64165fd503d79b4568c47e1 diff --git a/src/udev/udevd.c b/src/udev/udevd.c index b4fc624db..9bbc8ec8a 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -95,8 +95,9 @@ struct event { size_t devpath_len; const char *devpath_old; dev_t devnum; - bool is_block; int ifindex; + bool is_block; + bool nodelay; }; static inline struct event *node_to_event(struct udev_list_node *node) @@ -438,8 +439,10 @@ static int event_queue_insert(struct udev_device *dev) event->devpath_len = strlen(event->devpath); event->devpath_old = udev_device_get_devpath_old(dev); event->devnum = udev_device_get_devnum(dev); - event->is_block = (strcmp("block", udev_device_get_subsystem(dev)) == 0); + event->is_block = streq("block", udev_device_get_subsystem(dev)); event->ifindex = udev_device_get_ifindex(dev); + if (streq(udev_device_get_subsystem(dev), "firmware")) + event->nodelay = true; udev_queue_export_device_queued(udev_queue_export, dev); log_debug("seq %llu queued, '%s' '%s'\n", udev_device_get_seqnum(dev), @@ -519,6 +522,10 @@ static bool is_devpath_busy(struct event *event) return true; } + /* allow to bypass the dependency tracking */ + if (event->nodelay) + continue; + /* parent device event found */ if (event->devpath[common] == '/') { event->delaying_seqnum = loop_event->seqnum; @@ -1177,7 +1184,7 @@ int main(int argc, char *argv[]) } if (systemd_fds(udev, &fd_ctrl, &fd_netlink) >= 0) { - /* get control and netlink socket from from systemd */ + /* get control and netlink socket from systemd */ udev_ctrl = udev_ctrl_new_from_fd(udev, fd_ctrl); if (udev_ctrl == NULL) { log_error("error taking over udev control socket");