chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make use of unit_add_dependency_by_name() where applicable
[elogind.git]
/
load-dropin.c
diff --git
a/load-dropin.c
b/load-dropin.c
index a57bfc455be3d45b5a30f5b9e0c3b08ec214271b..521eb0821aea9c84128003b3bb4444f20c18e4ca 100644
(file)
--- a/
load-dropin.c
+++ b/
load-dropin.c
@@
-37,8
+37,6
@@
int unit_load_dropin(Unit *u) {
free(path);
while ((de = readdir(d))) {
free(path);
while ((de = readdir(d))) {
- Unit *other;
-
if (de->d_name[0] == '.')
continue;
if (de->d_name[0] == '.')
continue;
@@
-58,18
+56,13
@@
int unit_load_dropin(Unit *u) {
continue;
}
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;
}
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);
}
closedir(d);