diff options
Diffstat (limited to 'src/core/mount.c')
-rw-r--r-- | src/core/mount.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/core/mount.c b/src/core/mount.c index ebdb3503e9..2761f632bd 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -26,6 +26,7 @@ #include "sd-messages.h" +#include "alloc-util.h" #include "dbus-mount.h" #include "escape.h" #include "exit-status.h" @@ -35,10 +36,14 @@ #include "manager.h" #include "mkdir.h" #include "mount-setup.h" +#include "mount-util.h" #include "mount.h" +#include "parse-util.h" #include "path-util.h" +#include "process-util.h" #include "smack-util.h" #include "special.h" +#include "string-table.h" #include "string-util.h" #include "strv.h" #include "unit-name.h" @@ -251,9 +256,10 @@ static int mount_add_mount_links(Mount *m) { if (!path_equal(m->where, "/")) { /* Adds in links to other mount points that might lie further * up in the hierarchy */ - r = path_get_parent(m->where, &parent); - if (r < 0) - return r; + + parent = dirname_malloc(m->where); + if (!parent) + return -ENOMEM; r = unit_require_mounts_for(UNIT(m), parent); if (r < 0) |