SHA256
1
0
forked from pool/systemd
systemd/cryptsetup-accept-read-only.patch
Robert Milasan 86ba09ef56 Accepting request 150752 from home:fcrozat:branches:Base:System
- Add cryptsetup-accept-read-only.patch: accept "read-only" in
  addition to "readonly" in crypttab
- Update parse-multiline-env-file.patch to correctly handle
  commented lines (bnc#793411)

OBS-URL: https://build.opensuse.org/request/show/150752
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=340
2013-02-01 18:07:17 +00:00

48 lines
1.8 KiB
Diff

From 18cf1a1be5ae6985f211ec6f02504506da36b223 Mon Sep 17 00:00:00 2001
From: Michal Schmidt <mschmidt@redhat.com>
Date: Thu, 31 Jan 2013 11:03:09 +0100
Subject: [PATCH] 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
---
man/crypttab.xml | 2 +-
src/cryptsetup/cryptsetup.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/man/crypttab.xml b/man/crypttab.xml
index 2379fc0..f976bda 100644
--- a/man/crypttab.xml
+++ b/man/crypttab.xml
@@ -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
diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c
index f332843..a8cdf10 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;
--
1.7.10.4