* the order of the new options should not be changed
(for example prepend "a,b,c" to list with "d" has to generate "a,b,c,d", not "c,b,a,d")
* make sure that options map is defined when merging options
Fixes: https://github.com/util-linux/util-linux/issues/2238
Signed-off-by: Karel Zak <kzak@redhat.com>
/* remove inverted option */
else if (opt->ent && x->ent
+ && opt->map == x->map
&& opt->ent->id == x->ent->id
&& (opt->ent->mask & MNT_INVERT
|| x->ent->mask & MNT_INVERT))
if (!opt)
return -ENOMEM;
opt->src = MNT_OPTSRC_STRING;
+ if (where)
+ where = &opt->opts;
}
optlist_cleanup_cache(ls);
if (!opt)
return -ENOMEM;
opt->src = MNT_OPTSRC_FLAG;
+ if (where)
+ where = &opt->opts;
}
optlist_cleanup_cache(ls);