summaryrefslogtreecommitdiff
path: root/src/cryptsetup/cryptsetup.c
diff options
context:
space:
mode:
authorOndrej Balaz <blami@blami.net>2013-08-09 20:37:52 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-08-14 22:54:07 -0400
commit1acbb95c2b58373909d1e7a09a2eed0f6595cf6e (patch)
tree88cddf5bf7c21f3f7f4d2b3a0de88b05322ddde2 /src/cryptsetup/cryptsetup.c
parent3e7f60ab32fc2a7d5244d10a0c4e1c3be838409d (diff)
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.]
Diffstat (limited to 'src/cryptsetup/cryptsetup.c')
-rw-r--r--src/cryptsetup/cryptsetup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c
index 3a2cfe459b..ba0fdbc8e8 100644
--- a/src/cryptsetup/cryptsetup.c
+++ b/src/cryptsetup/cryptsetup.c
@@ -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;