Signed-off-by: Karel Zak <kzak@redhat.com>
{
int rc = 0;
char *org_type = NULL;
+ struct libmnt_optlist *ol = NULL;
assert(cxt);
assert(cxt->fs);
}
if (try_type) {
- cxt->mountflags |= MS_SILENT;
+ ol = mnt_context_get_optlist(cxt);
+ assert(ol);
+
+ mnt_optlist_append_flags(ol, MS_SILENT, cxt->map_linux);
if (mnt_fs_get_fstype(cxt->fs)) {
org_type = strdup(mnt_fs_get_fstype(cxt->fs));
if (!org_type) {
}
done:
- if (try_type)
- cxt->mountflags &= ~MS_SILENT;
+ if (try_type && ol)
+ mnt_optlist_remove_flags(ol, MS_SILENT, cxt->map_linux);
free(org_type);
return rc;
}