summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2015-04-07 14:03:44 +0200
committerDavid Herrmann <dh.herrmann@gmail.com>2015-04-07 14:03:44 +0200
commit64f75d7a2898e0c0d2b66f93ddd34ffd345bb3c5 (patch)
tree0b3f2163bae756b998f67b4b41c515a5cdf35516
parent24eb4a30982ed18d4716bd59c454a72f161d5982 (diff)
core: fix mount setup to work with non-existing mount points
We must not fail on ENOENT. We properly create the mount-point in mount-setup, so there's really no reason to skip the mount. Make sure we just skip the mount on unexpected failures or if it's already mounted.
-rw-r--r--src/core/mount-setup.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c
index 71b32d9be7..23fb0a1e38 100644
--- a/src/core/mount-setup.c
+++ b/src/core/mount-setup.c
@@ -157,12 +157,8 @@ static int mount_one(const MountPoint *p, bool relabel) {
label_fix(p->where, true, true);
r = path_is_mount_point(p->where, true);
- if (r == -ENOENT)
- return 0;
-
- if (r < 0)
+ if (r < 0 && r != -ENOENT)
return r;
-
if (r > 0)
return 0;