chiark / gitweb /
cryptsetup: accept both "read-only" and "readonly" spellings
authorMichal Schmidt <mschmidt@redhat.com>
Thu, 31 Jan 2013 10:03:09 +0000 (11:03 +0100)
committerMichal Schmidt <mschmidt@redhat.com>
Thu, 31 Jan 2013 18:57:56 +0000 (19:57 +0100)
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

man/crypttab.xml
src/cryptsetup/cryptsetup.c

index 2379fc08273ad7cf630ec6007d2d4f5a1dc78572..f976bdaa257db48980faf242725eef2bf2fbb617 100644 (file)
                         </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
index f33284370c0d7c3d588116198abe30ac67cb7d77..a8cdf10177b6311642470d05976610c2fa7bbe7f 100644 (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;