summaryrefslogtreecommitdiff
path: root/load-dropin.c
diff options
context:
space:
mode:
Diffstat (limited to 'load-dropin.c')
-rw-r--r--load-dropin.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/load-dropin.c b/load-dropin.c
index a57bfc455b..521eb0821a 100644
--- a/load-dropin.c
+++ b/load-dropin.c
@@ -37,8 +37,6 @@ int unit_load_dropin(Unit *u) {
free(path);
while ((de = readdir(d))) {
- Unit *other;
-
if (de->d_name[0] == '.')
continue;
@@ -58,18 +56,13 @@ int unit_load_dropin(Unit *u) {
continue;
}
- r = manager_load_unit(u->meta.manager, path, &other);
+ r = unit_add_dependency_by_name(u, UNIT_WANTS, path);
free(path);
if (r < 0) {
closedir(d);
return r;
}
-
- if ((r = unit_add_dependency(u, UNIT_WANTS, other)) < 0) {
- closedir(d);
- return r;
- }
}
closedir(d);