[git commit master 1/1] mount: add --rbind option support

Denys Vlasenko vda.linux at googlemail.com
Sat Mar 26 22:12:12 UTC 2011


commit: http://git.busybox.net/busybox/commit/?id=19311bfa7b8e8c6effa9c375de9b0eb4338bee12
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Roman Borisov <ext-roman.borisov at nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 include/usage.src.h |    2 +-
 util-linux/mount.c  |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/include/usage.src.h b/include/usage.src.h
index 29f7b21..d07b408 100644
--- a/include/usage.src.h
+++ b/include/usage.src.h
@@ -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" \
diff --git a/util-linux/mount.c b/util-linux/mount.c
index e672a73..722d0be 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -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"
-- 
1.7.3.4



More information about the busybox-cvs mailing list