summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-07-13 02:17:26 +0200
committerLennart Poettering <lennart@poettering.net>2010-07-13 02:17:26 +0200
commitee5f3479e27286574c34056d4dd16b6d8029e817 (patch)
tree987d8c9b0efc5817c39184eaf884e4e646f612fa
parent7c9c5d0eb1af19804c583fffdb95ca38049b204c (diff)
device: properly create dependencies
-rw-r--r--src/device.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/device.c b/src/device.c
index 2079f1c4e4..aeafd5e9f3 100644
--- a/src/device.c
+++ b/src/device.c
@@ -252,7 +252,7 @@ static int device_process_new_device(Manager *m, struct udev_device *dev, bool u
goto fail;
}
- r = unit_add_dependency_by_name(u, UNIT_WANTS, NULL, e, true);
+ r = unit_add_dependency_by_name(u, UNIT_WANTS, e, NULL, true);
free(e);
if (r < 0)
@@ -270,8 +270,12 @@ static int device_process_new_device(Manager *m, struct udev_device *dev, bool u
return 0;
fail:
+
+ log_warning("Failed to load device unit: %s", strerror(-r));
+
if (delete && u)
unit_free(u);
+
return r;
}