]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: log when unit_add_dependency() fails for some reason
authorLennart Poettering <lennart@poettering.net>
Mon, 4 Jun 2018 16:05:09 +0000 (18:05 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 7 Jun 2018 11:36:19 +0000 (13:36 +0200)
Also, proceed, as there's little we can do in this case.

src/core/device.c

index ba69fdc70d3e8c69f2dc4982a52df5607bad0a56..b4f162d1b741b3726a2fde638998478e66f584fd 100644 (file)
@@ -409,7 +409,7 @@ static bool device_is_bound_by_mounts(Device *d, struct udev_device *dev) {
         return d->bind_mounts;
 }
 
-static int device_upgrade_mount_deps(Unit *u) {
+static void device_upgrade_mount_deps(Unit *u) {
         Unit *other;
         Iterator i;
         void *v;
@@ -423,9 +423,8 @@ static int device_upgrade_mount_deps(Unit *u) {
 
                 r = unit_add_dependency(other, UNIT_BINDS_TO, u, true, UNIT_DEPENDENCY_UDEV);
                 if (r < 0)
-                        return r;
+                        log_unit_warning_errno(u, r, "Failed to add BindsTo= dependency between device and mount unit, ignoring: %m");
         }
-        return 0;
 }
 
 static int device_setup_unit(Manager *m, struct udev_device *dev, const char *path, bool main) {