Suppress error message when keyslot is unusable for segment.

It's too verbose when run in loop for token based activation.
This commit is contained in:
Ondrej Kozina
2021-07-21 19:00:21 +02:00
parent 426cab3aeb
commit 82816cb52f

View File

@@ -552,7 +552,7 @@ out:
if (r == -ENOMEM)
log_err(cd, _("Not enough available memory to open a keyslot."));
else if (r != -EPERM)
else if (r != -EPERM && r != -ENOENT)
log_err(cd, _("Keyslot open failed."));
}
return r;
@@ -589,7 +589,7 @@ int LUKS2_keyslot_open(struct crypt_device *cd,
if (r < 0) {
if (r == -ENOMEM)
log_err(cd, _("Not enough available memory to open a keyslot."));
else if (r != -EPERM)
else if (r != -EPERM && r != -ENOENT)
log_err(cd, _("Keyslot open failed."));
}