]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: ignore "defaults" mount option
authorKarel Zak <kzak@redhat.com>
Tue, 17 Jan 2012 15:12:04 +0000 (16:12 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 17 Jan 2012 15:12:04 +0000 (16:12 +0100)
 ... thanks to regression test!

Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/optstr.c

index 9e98798af494f545c593980b3af0ceb836954b42..7b1034e5d8344275a7d7f48c2a2699b4b1c8004c 100644 (file)
@@ -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) */