Tweak some error messages.

This commit is contained in:
Milan Broz
2023-11-29 09:21:01 +01:00
parent cea9c2972e
commit 5d50617594
3 changed files with 7 additions and 6 deletions

View File

@@ -3875,7 +3875,8 @@ int crypt_reencrypt_init_by_keyring(struct crypt_device *cd,
r = crypt_keyring_get_user_key(cd, passphrase_description, &passphrase, &passphrase_size);
if (r < 0) {
log_err(cd, _("Failed to read passphrase from keyring (error %d)."), r);
log_dbg(cd, "crypt_keyring_get_user_key failed (error %d)", r);
log_err(cd, _("Failed to read passphrase from keyring."));
return -EINVAL;
}

View File

@@ -258,9 +258,9 @@ int crypt_opal_supported(struct crypt_device *cd, struct device *opal_device)
r = opal_supported(cd, opal_device);
if (r <= 0) {
if (r == -ENOTSUP)
log_err(cd, _("cryptsetup library SED OPAL2 support is disabled."));
log_err(cd, _("OPAL support is disabled in libcryptsetup."));
else
log_err(cd, _("Device %s or kernel does not support OPAL2 HW encryption."),
log_err(cd, _("Device %s or kernel does not support OPAL encryption."),
device_path(opal_device));
r = -EINVAL;
} else
@@ -2239,7 +2239,7 @@ static int opal_topology_alignment(struct crypt_device *cd,
opal_align ? 'y' : 'n', opal_block_bytes, opal_alignment_granularity_blocks, opal_lowest_lba_blocks);
if (opal_block_bytes < SECTOR_SIZE || NOTPOW2(opal_block_bytes)) {
log_err(cd, _("Bogus OPAL2 logical block size."));
log_err(cd, _("Bogus OPAL logical block size."));
return -EINVAL;
}

View File

@@ -3563,10 +3563,10 @@ static void help(poptContext popt_context,
path = crypt_token_external_path();
if (path) {
log_std(_("\nLUKS2 external token plugin support is %s.\n"), _("compiled-in"));
log_std(_("\nLUKS2 external token plugin support is enabled.\n"));
log_std(_("LUKS2 external token plugin path: %s.\n"), path);
} else
log_std(_("\nLUKS2 external token plugin support is %s.\n"), _("disabled"));
log_std(_("\nLUKS2 external token plugin support is disabled.\n"));
pbkdf_luks1 = crypt_get_pbkdf_default(CRYPT_LUKS1);
pbkdf_luks2 = crypt_get_pbkdf_default(CRYPT_LUKS2);