]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: mount-setup: handle non-existing mountpoints gracefully
authorDaniel Mack <daniel@zonque.org>
Mon, 6 Apr 2015 22:44:15 +0000 (00:44 +0200)
committerDaniel Mack <daniel@zonque.org>
Mon, 6 Apr 2015 22:50:10 +0000 (00:50 +0200)
Commit e792e890f ("path-util: don't eat up ENOENT in
path_is_mount_point()") changed path_is_mount_point() so it doesn't hide
-ENOENT from its caller. This causes all boots to fail early in case
any of the mount points does not exist (for instance, when kdbus isn't
loaded, /sys/fs/kdbus is missing).

Fix this by returning 0 from mount_one() if path_is_mount_point()
returned -ENOENT.

src/core/mount-setup.c

index 343ff066a97d987622266ec72d9a4849e5964324..71b32d9be725386261d6f48ac68e7b567605d90a 100644 (file)
@@ -157,6 +157,9 @@ 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)
                 return r;