cryptsetup: accept both "read-only" and "readonly" spellings

Mukund Sivaraman pointed out that cryptsetup(5) mentions the "read-only"
option, while the code understands "readonly".

We could just fix the manpage, but for consistency in naming of
multi-word options it would be prettier to have "read-only". So let's
accept both spellings.

BZ: https://bugzilla.redhat.com/show_bug.cgi?id=903463
This commit is contained in:
Michal Schmidt 2013-01-31 11:03:09 +01:00
parent 682cfdff69
commit 18cf1a1be5
2 changed files with 2 additions and 2 deletions

View file

@ -182,7 +182,7 @@
</varlistentry>
<varlistentry>
<term><varname>read-only</varname></term>
<term><varname>read-only</varname></term><term><varname>readonly</varname></term>
<listitem><para>Set up the encrypted
block device in read-only

View file

@ -111,7 +111,7 @@ static int parse_one_option(const char *option) {
return 0;
}
} else if (streq(option, "readonly"))
} else if (streq(option, "readonly") || streq(option, "read-only"))
opt_readonly = true;
else if (streq(option, "verify"))
opt_verify = true;