From c1f3576e0acddd058552847f0b6665ad8b643a41 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 17 Jan 2012 16:12:04 +0100 Subject: libmount: ignore "defaults" mount option ... thanks to regression test! Signed-off-by: Karel Zak --- libmount/src/optstr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libmount/src/optstr.c') diff --git a/libmount/src/optstr.c b/libmount/src/optstr.c index 9e98798af..7b1034e5d 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) */ -- cgit v1.2.3-55-g7522