Better explain --persistent option for flag removals.

Also fix a error message that was not displayed
properly for the persistent discard flag incompatibility.

Fixes: #558.
This commit is contained in:
Milan Broz
2020-05-02 17:08:19 +02:00
parent 533b874590
commit e759ebe0bd
2 changed files with 7 additions and 2 deletions

View File

@@ -2156,7 +2156,7 @@ int LUKS2_activate(struct crypt_device *cd,
return -EINVAL;
}
if (flags & CRYPT_ACTIVATE_ALLOW_DISCARDS) {
if (dmd.flags & CRYPT_ACTIVATE_ALLOW_DISCARDS) {
log_err(cd, _("Discard/TRIM is not supported."));
return -EINVAL;
}