]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/device: downgrade error when units specified in SYSTEMD_WANTS= not found
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 18 May 2023 20:27:46 +0000 (05:27 +0900)
committerMike Yuan <me@yhndnzj.com>
Fri, 19 May 2023 07:25:28 +0000 (15:25 +0800)
Closes #27693.

src/core/device.c

index 1449867e357225644abc0b9f6385e46033591907..8d1c6f7d775bab46eee3a44c1feb22008bddf348 100644 (file)
@@ -6,7 +6,7 @@
 #include "sd-messages.h"
 
 #include "alloc-util.h"
-#include "bus-error.h"
+#include "bus-common-errors.h"
 #include "dbus-device.h"
 #include "dbus-unit.h"
 #include "device-private.h"
@@ -619,7 +619,8 @@ static int device_add_udev_wants(Unit *u, sd_device *dev) {
 
                         r = manager_add_job_by_name(u->manager, JOB_START, *i, JOB_FAIL, NULL, &error, NULL);
                         if (r < 0)
-                                log_unit_warning_errno(u, r, "Failed to enqueue SYSTEMD_WANTS= job, ignoring: %s", bus_error_message(&error, r));
+                                log_unit_full_errno(u, sd_bus_error_has_name(&error, BUS_ERROR_NO_SUCH_UNIT) ? LOG_DEBUG : LOG_WARNING, r,
+                                                    "Failed to enqueue %s job, ignoring: %s", property, bus_error_message(&error, r));
                 }
 
         return strv_free_and_replace(d->wants_property, added);