]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev: update log message to clarify that the error is ignored
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 16 Jun 2021 12:02:01 +0000 (21:02 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 10 Aug 2021 06:16:56 +0000 (15:16 +0900)
src/udev/udevd.c

index 546bfe039e1d15ed88ef85bb552786535aa11940..34a5c9d5d8ee7824ba0fd65752575782135acbcb 100644 (file)
@@ -171,8 +171,8 @@ static void event_free(Event *event) {
         /* only clean up the queue from the process that created it */
         if (LIST_IS_EMPTY(event->manager->events) &&
             event->manager->pid == getpid_cached())
-                if (unlink("/run/udev/queue") < 0)
-                        log_warning_errno(errno, "Failed to unlink /run/udev/queue: %m");
+                if (unlink("/run/udev/queue") < 0 && errno != ENOENT)
+                        log_warning_errno(errno, "Failed to unlink /run/udev/queue, ignoring: %m");
 
         free(event);
 }
@@ -965,7 +965,7 @@ static int event_queue_insert(Manager *manager, sd_device *dev) {
         if (LIST_IS_EMPTY(manager->events)) {
                 r = touch("/run/udev/queue");
                 if (r < 0)
-                        log_warning_errno(r, "Failed to touch /run/udev/queue: %m");
+                        log_warning_errno(r, "Failed to touch /run/udev/queue, ignoring: %m");
         }
 
         LIST_APPEND(event, manager->events, event);