summaryrefslogtreecommitdiff
path: root/src/mount.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-05-24 05:25:33 +0200
committerLennart Poettering <lennart@poettering.net>2010-05-24 05:25:33 +0200
commit01f78473b104d28db0fa813414092bc6358ae521 (patch)
treedbc1a63d818c7420ee2a50cbd205ae90b0c7185d /src/mount.c
parent871d7de47c13ee6cd78b8eefdf9128be3c740ac0 (diff)
path: add .path unit type for monitoring files
Diffstat (limited to 'src/mount.c')
-rw-r--r--src/mount.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mount.c b/src/mount.c
index 01fc2dffbb..dfe4f875e1 100644
--- a/src/mount.c
+++ b/src/mount.c
@@ -167,6 +167,19 @@ static int mount_add_swap_links(Mount *m) {
return 0;
}
+static int mount_add_path_links(Mount *m) {
+ Meta *other;
+ int r;
+
+ assert(m);
+
+ LIST_FOREACH(units_per_type, other, m->meta.manager->units_per_type[UNIT_PATH])
+ if ((r = path_add_one_mount_link((Path*) other, m)) < 0)
+ return r;
+
+ return 0;
+}
+
static int mount_add_automount_links(Mount *m) {
Meta *other;
int r;
@@ -341,6 +354,9 @@ static int mount_load(Unit *u) {
if ((r = mount_add_swap_links(m)) < 0)
return r;
+ if ((r = mount_add_path_links(m)) < 0)
+ return r;
+
if ((r = mount_add_automount_links(m)) < 0)
return r;