]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
mount: (new) fix MS_REC usage
authorKarel Zak <kzak@redhat.com>
Mon, 28 May 2012 17:54:16 +0000 (19:54 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 28 May 2012 17:54:16 +0000 (19:54 +0200)
 # mount -R /mnt/test /mnt/test
 mount: propagation flags (--make-* or --bind options) are mutually exclusive

Reported-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/mount.c

index a4fbd9b8fcbae7bddf1c81b9d6792f0bfaa09e55..2b8843cc7e51b220ccd307ca251ba54b792a8e4a 100644 (file)
@@ -902,7 +902,7 @@ int main(int argc, char **argv)
                usage(stderr);
 
        if (oper) {
-               if (!is_power_of_2(oper))
+               if (!is_power_of_2(oper & ~MS_REC))
                        errx(MOUNT_EX_USAGE, _("propagation flags (--make-* or --bind options) are mutually exclusive"));
 
                if (oper != MS_BIND && mnt_context_get_options(cxt))