From 0744e74c526814e28f2fbcea128f40ed36341fcd Mon Sep 17 00:00:00 2001
From: Yu Watanabe <watanabe.yu+github@gmail.com>
Date: Thu, 17 Jun 2021 15:29:02 +0900
Subject: [PATCH] udev: make event_queue_start() return negative errno on error
 
Reference:https://github.com/systemd/systemd/commit/0744e74c526814e28f2fbcea128f40ed36341fcd
Conflict:NA
 
---
 src/udev/udevd.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
 
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index 1b1b126..279b409 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -879,7 +879,7 @@ set_delaying_seqnum:
         return true;
 }
 
-static void event_queue_start(Manager *manager) {
+static int event_queue_start(Manager *manager) {
         Event *event;
         usec_t usec;
         int r;
@@ -888,7 +888,7 @@ static void event_queue_start(Manager *manager) {
 
         if (LIST_IS_EMPTY(manager->events) ||
             manager->exit || manager->stop_exec_queue)
-                return;
+                return 0;
 
         assert_se(sd_event_now(manager->event, CLOCK_MONOTONIC, &usec) >= 0);
         /* check for changed config, every 3 seconds at most */
@@ -909,10 +909,8 @@ static void event_queue_start(Manager *manager) {
 
         if (!manager->rules) {
                 r = udev_rules_load(&manager->rules, arg_resolve_name_timing);
-                if (r < 0) {
-                        log_warning_errno(r, "Failed to read udev rules: %m");
-                        return;
-                }
+                if (r < 0)
+                        return log_warning_errno(r, "Failed to read udev rules: %m");
         }
 
         LIST_FOREACH(event, event, manager->events) {
@@ -925,6 +923,8 @@ static void event_queue_start(Manager *manager) {
 
                 event_run(manager, event);
         }
+
+        return 0;
 }
 
 static int event_queue_insert(Manager *manager, sd_device *dev) {
-- 
2.33.0
 