X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;ds=sidebyside;f=udev%2Flib%2Flibudev-queue.c;h=5cd5ef75c9e05423756eb5c0f18c6d9486ae7bc3;hb=19d7e87cc0ef364fb13a18411cb165b2427b3529;hp=a0f4c5575ca4dfccf732711a85850a7676ea0ef4;hpb=4061ab9f4bb0bdad3858e8ef1738dc892afe9de4;p=elogind.git diff --git a/udev/lib/libudev-queue.c b/udev/lib/libudev-queue.c index a0f4c5575..5cd5ef75c 100644 --- a/udev/lib/libudev-queue.c +++ b/udev/lib/libudev-queue.c @@ -178,12 +178,11 @@ int udev_queue_get_seqnum_is_finished(struct udev_queue *udev_queue, unsigned lo if (udev_queue == NULL) return -EINVAL; - /* if we have not seen this seqnum, check if it is/was already queued */ - if (seqnum < udev_queue->last_seen_udev_seqnum) { - udev_queue_get_udev_seqnum(udev_queue); - if (seqnum < udev_queue->last_seen_udev_seqnum) + /* did it reach the queue? */ + if (seqnum > udev_queue->last_seen_udev_seqnum) + if (seqnum > udev_queue_get_udev_seqnum(udev_queue)) return 0; - } + /* is it still in the queue? */ snprintf(filename, sizeof(filename), "%s/.udev/queue/%llu", udev_get_dev_path(udev_queue->udev), seqnum); if (lstat(filename, &statbuf) == 0)