summaryrefslogtreecommitdiff
path: root/src/core/mount.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-10-27 16:55:16 +0100
committerTom Gundersen <teg@jklm.no>2015-10-27 16:55:16 +0100
commit0d0696812980d8f41c54739ad73716a233a2fa7c (patch)
tree217d98308a3039e106efde5fd6a7b6a657916950 /src/core/mount.c
parentf47fc3ffc4b69a00083a76308f777b52afb8efbf (diff)
parent7760171904ef007f19e8f46aa240a00e382d5b74 (diff)
Merge pull request #1691 from poettering/util-lib-3
split up util.h and macro.h into even more bits
Diffstat (limited to 'src/core/mount.c')
-rw-r--r--src/core/mount.c12
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)