From 374fd21addc8519de832bb78b9bf6a6675a477a7 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 16 Jan 2012 14:35:10 +0100 Subject: libmount: add MNT_OMODE_NOTAB Signed-off-by: Karel Zak --- sys-utils/mount.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'sys-utils/mount.c') diff --git a/sys-utils/mount.c b/sys-utils/mount.c index c81af1af9..81ccb411b 100644 --- a/sys-utils/mount.c +++ b/sys-utils/mount.c @@ -43,6 +43,10 @@ /*** TODO: DOCS: * * --guess-fstype is unsupported + * + * --options-mode={ignore,append,prepend,replace} MNT_OMODE_{IGNORE, ...} + * --options-source={fstab,mtab,disable} MNT_OMODE_{FSTAB,MTAB,NOTAB} + * --options-source-force MNT_OMODE_FORCE */ /* exit status */ @@ -801,9 +805,14 @@ int main(int argc, char **argv) } else usage(stderr); - if (oper) + if (oper) { + /* MS_PROPAGATION operations, let's set the mount flags */ mnt_context_set_mflags(cxt, oper); + /* For -make* or --bind is fstab unnecessary */ + mnt_context_set_optsmode(cxt, MNT_OMODE_NOTAB); + } + rc = mnt_context_mount(cxt); rc = mk_exit_code(cxt, rc); -- cgit v1.2.3-55-g7522