systemd-cryptsetup: makes “discard” a synonym for “allow-discards”

systemd-cryptsetup recognizes option 'allow-discards' in /etc/crypttab
to enable TRIM passthrough to underlying encrypted device. In Debian
this option was changed to 'discard' to avoid hyphen in option name.
(see: #648868 and `man crypttab`).

[zj: update crypttab(5) too, making "discard" the default.]
This commit is contained in:
Ondrej Balaz 2013-08-09 20:37:52 +02:00 committed by Zbigniew Jędrzejewski-Szmek
parent 3e7f60ab32
commit 1acbb95c2b
2 changed files with 2 additions and 2 deletions

View File

@ -112,7 +112,7 @@
<variablelist class='crypttab-options'>
<varlistentry>
<term><varname>allow-discards</varname></term>
<term><varname>discard</varname></term>
<listitem><para>Allow discard requests to be
passed through the encrypted block device. This

View File

@ -129,7 +129,7 @@ static int parse_one_option(const char *option) {
opt_readonly = true;
else if (streq(option, "verify"))
opt_verify = true;
else if (streq(option, "allow-discards"))
else if (streq(option, "allow-discards") || streq(option, "discard"))
opt_discards = true;
else if (streq(option, "luks"))
opt_type = CRYPT_LUKS1;