diff options
author | Karel Zak <kzak@redhat.com> | 2013-01-15 16:08:41 +0100 |
---|---|---|
committer | Karel Zak <kzak@redhat.com> | 2013-01-15 16:08:41 +0100 |
commit | 56a21c9336531e8c72406b3366fe35d951ad532a (patch) | |
tree | 1467df2e0769092900d13f65c319b6a3547cff5c /libmount/src | |
parent | f5ae1d706e37f83e0cc9f40cadf4e4410e42247a (diff) | |
download | util-linux-56a21c9336531e8c72406b3366fe35d951ad532a.tar.gz |
libmount: keep MS_PROPAGATION flags in mnt_context_set_mflags() result
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src')
-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 2e28d650..6d570383 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; |