X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=libudev%2Flibudev-queue-private.c;h=6109837f7ecc44530dcedf81179083fd19d9e919;hp=4e67a1f9d05ae2503ab43b5860c92fcd4c2e7ab7;hb=d80f8ffd1a182fe7fff9816e8a4efc09e877964b;hpb=b6a2637524e4b94ba51abcf5ee42f3676c9755ed;ds=sidebyside diff --git a/libudev/libudev-queue-private.c b/libudev/libudev-queue-private.c index 4e67a1f9d..6109837f7 100644 --- a/libudev/libudev-queue-private.c +++ b/libudev/libudev-queue-private.c @@ -396,7 +396,6 @@ static void update_failed(struct udev_queue_export *udev_queue_export, { struct udev *udev = udev_device_get_udev(udev_device); char filename[UTIL_PATH_SIZE]; - int err; if (state != DEVICE_FAILED && udev_queue_export->failed_count == 0) return; @@ -409,14 +408,10 @@ static void update_failed(struct udev_queue_export *udev_queue_export, case DEVICE_FAILED: /* record event in the failed directory */ udev_queue_export->failed_count++; - do { - util_create_path(udev, filename); - udev_selinux_setfscreatecon(udev, filename, S_IFLNK); - err = symlink(udev_device_get_devpath(udev_device), filename); - if (err != 0) - err = errno; - udev_selinux_resetfscreatecon(udev); - } while (err == ENOENT); + util_create_path(udev, filename); + udev_selinux_setfscreatecon(udev, filename, S_IFLNK); + symlink(udev_device_get_devpath(udev_device), filename); + udev_selinux_resetfscreatecon(udev); break; case DEVICE_QUEUED: