[systemd-commits] src/core

David Herrmann dvdhrm at kemper.freedesktop.org
Tue Apr 7 05:05:05 PDT 2015


 src/core/mount-setup.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

New commits:
commit 64f75d7a2898e0c0d2b66f93ddd34ffd345bb3c5
Author: David Herrmann <dh.herrmann at gmail.com>
Date:   Tue Apr 7 14:03:44 2015 +0200

    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.

diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c
index 71b32d9..23fb0a1 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;
 



More information about the systemd-commits mailing list