mount: add --rbind option support
authorRoman Borisov <ext-roman.borisov@nokia.com>
Thu, 24 Mar 2011 12:08:43 +0000 (15:08 +0300)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sat, 26 Mar 2011 22:12:12 +0000 (23:12 +0100)
Signed-off-by: Roman Borisov <ext-roman.borisov@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
include/usage.src.h
util-linux/mount.c

index 29f7b2110b71bcc14eb2cc7e61c3cbfeb49e6909..d07b408a6bf6a1561aeca087fead71d8f5a2903f 100644 (file)
@@ -2482,7 +2482,7 @@ INSERT
      "\n       [r]slave        Convert [recursively] to a slave subtree" \
      "\n       [r]private      Convert [recursively] to a private subtree" \
      "\n       [un]bindable    Make mount point [un]able to be bind mounted" \
-     "\n       bind            Bind a file or directory to another location" \
+     "\n       [r]bind         Bind a file or directory [recursively] to another location" \
      "\n       move            Relocate an existing mount point" \
        ) \
      "\n       remount         Remount a mounted filesystem, changing flags" \
index e672a73f4f75cde00df7c3eb77cc5f42a37bdb5c..722d0be921d84fef7590297b5f645b45afb5488d 100644 (file)
@@ -181,6 +181,7 @@ static const int32_t mount_options[] = {
                /* "relatime"    */ MS_RELATIME,
                /* "norelatime"  */ ~MS_RELATIME,
                /* "loud"        */ ~MS_SILENT,
+               /* "rbind"       */ MS_BIND|MS_RECURSIVE,
 
                // action flags
                /* "union"       */ MS_UNION,
@@ -236,6 +237,7 @@ static const char mount_option_str[] =
                "relatime\0"
                "norelatime\0"
                "loud\0"
+               "rbind\0"
 
                // action flags
                "union\0"