diff options
author | Karel Zak | 2013-01-15 16:08:41 +0100 |
---|---|---|
committer | Karel Zak | 2013-01-15 16:08:41 +0100 |
commit | 56a21c9336531e8c72406b3366fe35d951ad532a (patch) | |
tree | 1467df2e0769092900d13f65c319b6a3547cff5c /libmount/src/context.c | |
parent | mount: write success messages to stdout (diff) | |
download | kernel-qcow2-util-linux-56a21c9336531e8c72406b3366fe35d951ad532a.tar.gz kernel-qcow2-util-linux-56a21c9336531e8c72406b3366fe35d951ad532a.tar.xz kernel-qcow2-util-linux-56a21c9336531e8c72406b3366fe35d951ad532a.zip |
libmount: keep MS_PROPAGATION flags in mnt_context_set_mflags() result
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/context.c')
-rw-r--r-- | libmount/src/context.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libmount/src/context.c b/libmount/src/context.c index 2e28d650a..6d5703834 100644 --- a/libmount/src/context.c +++ b/libmount/src/context.c @@ -1212,6 +1212,8 @@ int mnt_context_set_mflags(struct libmnt_context *cxt, unsigned long flags) int mnt_context_get_mflags(struct libmnt_context *cxt, unsigned long *flags) { int rc = 0; + struct list_head *p; + if (!cxt || !flags) return -EINVAL; @@ -1222,6 +1224,14 @@ int mnt_context_get_mflags(struct libmnt_context *cxt, unsigned long *flags) rc = mnt_optstr_get_flags(o, flags, mnt_get_builtin_optmap(MNT_LINUX_MAP)); } + + list_for_each(p, &cxt->addmounts) { + struct libmnt_addmount *ad = + list_entry(p, struct libmnt_addmount, mounts); + + *flags |= ad->mountflags; + } + if (!rc) *flags |= cxt->mountflags; return rc; |