summaryrefslogtreecommitdiff
path: root/libudev/libudev-queue-private.c
diff options
context:
space:
mode:
Diffstat (limited to 'libudev/libudev-queue-private.c')
-rw-r--r--libudev/libudev-queue-private.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libudev/libudev-queue-private.c b/libudev/libudev-queue-private.c
index 4e67a1f9d0..37de67a3d4 100644
--- a/libudev/libudev-queue-private.c
+++ b/libudev/libudev-queue-private.c
@@ -410,13 +410,15 @@ static void update_failed(struct udev_queue_export *udev_queue_export,
/* record event in the failed directory */
udev_queue_export->failed_count++;
do {
- util_create_path(udev, filename);
+ err = util_create_path(udev, filename);
+ if (err != 0 && err != -ENOENT)
+ break;
udev_selinux_setfscreatecon(udev, filename, S_IFLNK);
err = symlink(udev_device_get_devpath(udev_device), filename);
if (err != 0)
- err = errno;
+ err = -errno;
udev_selinux_resetfscreatecon(udev);
- } while (err == ENOENT);
+ } while (err == -ENOENT);
break;
case DEVICE_QUEUED: