X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fmount.c;h=dfe4f875e15ecafec55294325c74fa261dd3a0d2;hp=01fc2dffbbee3bbbe057b27511f5f98b675e9fd8;hb=01f78473b104d28db0fa813414092bc6358ae521;hpb=871d7de47c13ee6cd78b8eefdf9128be3c740ac0;ds=sidebyside diff --git a/src/mount.c b/src/mount.c index 01fc2dffb..dfe4f875e 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;