[systemd-commits] src/core src/fstab-generator

Lennart Poettering lennart at kemper.freedesktop.org
Fri Mar 1 05:43:57 PST 2013


 src/core/mount.c                      |    6 ++++++
 src/fstab-generator/fstab-generator.c |    4 +++-
 2 files changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 3f8ee7918207d7128d4edbc20a1e81f4c6e1110e
Author: Frederic Crozat <fcrozat at suse.com>
Date:   Thu Feb 21 16:09:40 2013 +0100

    fstab,mount: detect rbind as bind mount
    
    Correctly detect rbind mount option as bind mount.
    
    Fixes https://bugzilla.novell.com/show_bug.cgi?id=804575.

diff --git a/src/core/mount.c b/src/core/mount.c
index e3d298e..419cf27 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -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;
 }
 
diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
index bfedded..9db4123 100644
--- a/src/fstab-generator/fstab-generator.c
+++ b/src/fstab-generator/fstab-generator.c
@@ -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) {



More information about the systemd-commits mailing list