From: Karel Zak Date: Tue, 17 Jan 2012 15:12:04 +0000 (+0100) Subject: libmount: ignore "defaults" mount option X-Git-Tag: v2.21-rc1~28 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c1f3576e0acddd058552847f0b6665ad8b643a41;p=thirdparty%2Futil-linux.git libmount: ignore "defaults" mount option ... thanks to regression test! Signed-off-by: Karel Zak --- diff --git a/libmount/src/optstr.c b/libmount/src/optstr.c index 9e98798af4..7b1034e5d8 100644 --- a/libmount/src/optstr.c +++ b/libmount/src/optstr.c @@ -722,7 +722,9 @@ int mnt_optstr_apply_flags(char **optstr, unsigned long flags, char *p; for (ent = map; ent && ent->name; ent++) { - if ((ent->mask & MNT_INVERT) || (fl & ent->id) != ent->id) + if ((ent->mask & MNT_INVERT) + || ent->id == 0 + || (fl & ent->id) != ent->id) continue; /* don't add options which require values (e.g. offset=%d) */