libmount: keep MS_PROPAGATION flags in mnt_context_set_mflags() result
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
f5ae1d706e
commit
56a21c9336
|
@ -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 mnt_context_get_mflags(struct libmnt_context *cxt, unsigned long *flags)
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
struct list_head *p;
|
||||||
|
|
||||||
if (!cxt || !flags)
|
if (!cxt || !flags)
|
||||||
return -EINVAL;
|
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,
|
rc = mnt_optstr_get_flags(o, flags,
|
||||||
mnt_get_builtin_optmap(MNT_LINUX_MAP));
|
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)
|
if (!rc)
|
||||||
*flags |= cxt->mountflags;
|
*flags |= cxt->mountflags;
|
||||||
return rc;
|
return rc;
|
||||||
|
|
Loading…
Reference in New Issue