summaryrefslogtreecommitdiff
path: root/src/core/automount.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-05-22 19:23:33 +0200
committerLennart Poettering <lennart@poettering.net>2012-05-22 19:25:17 +0200
commit6b1dc2bd3cdb3bd932b0692be636ddd2879edb92 (patch)
tree2103f7daf0619c14f8da9be956f4ddbbe9309d51 /src/core/automount.c
parent745e2fb79ab20f3e98310d5e889a161ffe8b492c (diff)
mount: replace PID1 internal fstab parser with generator
Bit by bit we should remove non-unit parsing from PID 1 and move into generators, to clean up our code base a bit and clearly separate parsers.
Diffstat (limited to 'src/core/automount.c')
-rw-r--r--src/core/automount.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/core/automount.c b/src/core/automount.c
index f190417fa3..e13259b388 100644
--- a/src/core/automount.c
+++ b/src/core/automount.c
@@ -156,14 +156,12 @@ static int automount_add_default_dependencies(Automount *a) {
assert(a);
- if (UNIT(a)->manager->running_as == MANAGER_SYSTEM) {
-
- if ((r = unit_add_dependency_by_name(UNIT(a), UNIT_BEFORE, SPECIAL_BASIC_TARGET, NULL, true)) < 0)
- return r;
+ if (UNIT(a)->manager->running_as != MANAGER_SYSTEM)
+ return 0;
- if ((r = unit_add_two_dependencies_by_name(UNIT(a), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_UMOUNT_TARGET, NULL, true)) < 0)
- return r;
- }
+ r = unit_add_two_dependencies_by_name(UNIT(a), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_UMOUNT_TARGET, NULL, true);
+ if (r < 0)
+ return r;
return 0;
}