Support negated fstab options

We would ignore options like "fail" and "auto", and for any option
which takes a value the first assignment would win. Repeated and
options equivalent to the default are rarely used, but they have been
documented forever, and people might use them. Especially on the
kernel command line it is easier to append a repeated or negated
option at the end.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2015-01-11 23:41:41 -05:00
parent a6dba97829
commit b9f111b93f
5 changed files with 35 additions and 15 deletions
+1 -1
View File
@@ -69,7 +69,7 @@ static int parse_one_option(const char *option) {
assert(option);
/* Handled outside of this tool */
if (streq(option, "noauto") || streq(option, "nofail"))
if (STR_IN_SET(option, "noauto", "auto", "nofail", "fail"))
return 0;
if (startswith(option, "cipher=")) {