From: Michal Schmidt Date: Thu, 31 Jan 2013 10:03:09 +0000 (+0100) Subject: cryptsetup: accept both "read-only" and "readonly" spellings X-Git-Tag: v198~356 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=18cf1a1be5ae6985f211ec6f02504506da36b223 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 --- diff --git a/man/crypttab.xml b/man/crypttab.xml index 2379fc082..f976bdaa2 100644 --- a/man/crypttab.xml +++ b/man/crypttab.xml @@ -182,7 +182,7 @@ - read-only + read-onlyreadonly Set up the encrypted block device in read-only diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c index f33284370..a8cdf1017 100644 --- a/src/cryptsetup/cryptsetup.c +++ b/src/cryptsetup/cryptsetup.c @@ -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;