summaryrefslogtreecommitdiffstats
path: root/sys-utils/mount.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys-utils/mount.c')
-rw-r--r--sys-utils/mount.c11
1 files changed, 10 insertions, 1 deletions
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);