When mounting a filesystem without any additional options (data parameter
to the mount(2) syscall), pass NULL instead of an empty string like GNU
mount does. This fixes, for example mounting cgroup fs with bbox mount.

Signed-off-by: Alexander Shishkin <[email protected]>
---
 util-linux/mount.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/util-linux/mount.c b/util-linux/mount.c
index d1d6889..3e53023 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -344,6 +344,7 @@ static long parse_mount_options(char *options, char 
**unrecognized)
                const char *option_str = mount_option_str;
 
                if (comma) *comma = '\0';
+               else if (!*options) break; /* no options -- leave */
 
 // FIXME: use hasmntopt()
                // Find this option in mount_options
-- 
1.7.1

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to