diff options
author | Karel Zak | 2012-01-17 16:12:04 +0100 |
---|---|---|
committer | Karel Zak | 2012-01-17 16:12:04 +0100 |
commit | c1f3576e0acddd058552847f0b6665ad8b643a41 (patch) | |
tree | 7a40b2db03e5b6d85ef162ffd74647a130f6f3dc /libmount/src/optstr.c | |
parent | sfdisk: add note about alignment to the man page (diff) | |
download | kernel-qcow2-util-linux-c1f3576e0acddd058552847f0b6665ad8b643a41.tar.gz kernel-qcow2-util-linux-c1f3576e0acddd058552847f0b6665ad8b643a41.tar.xz kernel-qcow2-util-linux-c1f3576e0acddd058552847f0b6665ad8b643a41.zip |
libmount: ignore "defaults" mount option
... thanks to regression test!
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/optstr.c')
-rw-r--r-- | libmount/src/optstr.c | 4 |
1 files changed, 3 insertions, 1 deletions
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) */ |