chiark / gitweb /
fstab,mount: detect rbind as bind mount
authorFrederic Crozat <fcrozat@suse.com>
Thu, 21 Feb 2013 15:09:40 +0000 (16:09 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 1 Mar 2013 13:43:18 +0000 (14:43 +0100)
Correctly detect rbind mount option as bind mount.

Fixes https://bugzilla.novell.com/show_bug.cgi?id=804575.

src/core/mount.c
src/fstab-generator/fstab-generator.c

index e3d298e..419cf27 100644 (file)
@@ -329,6 +329,12 @@ static bool mount_is_bind(MountParameters *p) {
         if (p->fstype && streq(p->fstype, "bind"))
                 return true;
 
+        if (mount_test_option(p->options, "rbind"))
+                return true;
+
+        if (p->fstype && streq(p->fstype, "rbind"))
+                return true;
+
         return false;
 }
 
index bfedded..9db4123 100644 (file)
@@ -178,7 +178,9 @@ static bool mount_is_bind(struct mntent *me) {
 
         return
                 hasmntopt(me, "bind") ||
-                streq(me->mnt_type, "bind");
+                streq(me->mnt_type, "bind") ||
+                hasmntopt(me, "rbind") ||
+                streq(me->mnt_type, "rbind");
 }
 
 static bool mount_is_network(struct mntent *me) {