mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-06 00:10:04 +01:00
Fix non-translated messages.
This commit is contained in:
@@ -31,7 +31,7 @@ static void _error_hint(struct crypt_device *ctx, const char *device,
|
||||
device, cipher_spec);
|
||||
|
||||
if (!strncmp(mode, "xts", 3) && (keyLength != 256 && keyLength != 512))
|
||||
log_err(ctx, _("Key size in XTS mode must be 256 or 512 bits.\n"));
|
||||
log_err(ctx, _("Key size in XTS mode must be 256 or 512 bits.\n"));
|
||||
}
|
||||
|
||||
static int LUKS_endec_template(char *src, size_t srcLength,
|
||||
|
||||
@@ -645,7 +645,7 @@ int LUKS_generate_phdr(struct luks_phdr *header,
|
||||
|
||||
r = crypt_random_get(ctx, header->mkDigestSalt, LUKS_SALTSIZE, CRYPT_RND_SALT);
|
||||
if(r < 0) {
|
||||
log_err(ctx, _("Cannot create LUKS header: reading random salt failed.\n"));
|
||||
log_err(ctx, _("Cannot create LUKS header: reading random salt failed.\n"));
|
||||
return r;
|
||||
}
|
||||
|
||||
@@ -667,7 +667,7 @@ int LUKS_generate_phdr(struct luks_phdr *header,
|
||||
header->mkDigest,LUKS_DIGESTSIZE,
|
||||
header->mkDigestIterations);
|
||||
if(r < 0) {
|
||||
log_err(ctx, _("Cannot create LUKS header: header digest failed (using hash %s).\n"),
|
||||
log_err(ctx, _("Cannot create LUKS header: header digest failed (using hash %s).\n"),
|
||||
header->hashSpec);
|
||||
return r;
|
||||
}
|
||||
@@ -732,7 +732,7 @@ int LUKS_set_key(unsigned int keyIndex,
|
||||
int r;
|
||||
|
||||
if(hdr->keyblock[keyIndex].active != LUKS_KEY_DISABLED) {
|
||||
log_err(ctx, _("Key slot %d active, purge first.\n"), keyIndex);
|
||||
log_err(ctx, _("Key slot %d active, purge first.\n"), keyIndex);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
||||
12
lib/setup.c
12
lib/setup.c
@@ -1465,9 +1465,9 @@ int crypt_suspend(struct crypt_device *cd,
|
||||
|
||||
r = dm_suspend_and_wipe_key(cd, name);
|
||||
if (r == -ENOTSUP)
|
||||
log_err(cd, "Suspend is not supported for device %s.\n", name);
|
||||
log_err(cd, _("Suspend is not supported for device %s.\n"), name);
|
||||
else if (r)
|
||||
log_err(cd, "Error during suspending device %s.\n", name);
|
||||
log_err(cd, _("Error during suspending device %s.\n"), name);
|
||||
out:
|
||||
dm_backend_exit();
|
||||
return r;
|
||||
@@ -1509,9 +1509,9 @@ int crypt_resume_by_passphrase(struct crypt_device *cd,
|
||||
keyslot = r;
|
||||
r = dm_resume_and_reinstate_key(cd, name, vk->keylength, vk->key);
|
||||
if (r == -ENOTSUP)
|
||||
log_err(cd, "Resume is not supported for device %s.\n", name);
|
||||
log_err(cd, _("Resume is not supported for device %s.\n"), name);
|
||||
else if (r)
|
||||
log_err(cd, "Error during resuming device %s.\n", name);
|
||||
log_err(cd, _("Error during resuming device %s.\n"), name);
|
||||
} else
|
||||
r = keyslot;
|
||||
out:
|
||||
@@ -1565,7 +1565,7 @@ int crypt_resume_by_keyfile_offset(struct crypt_device *cd,
|
||||
keyslot = r;
|
||||
r = dm_resume_and_reinstate_key(cd, name, vk->keylength, vk->key);
|
||||
if (r)
|
||||
log_err(cd, "Error during resuming device %s.\n", name);
|
||||
log_err(cd, _("Error during resuming device %s.\n"), name);
|
||||
out:
|
||||
crypt_safe_free(passphrase_read);
|
||||
crypt_free_volume_key(vk);
|
||||
@@ -2190,7 +2190,7 @@ int crypt_volume_key_get(struct crypt_device *cd,
|
||||
int r = -EINVAL;
|
||||
|
||||
if (crypt_fips_mode()) {
|
||||
log_err(cd, "Function not available in FIPS mode.\n");
|
||||
log_err(cd, _("Function not available in FIPS mode.\n"));
|
||||
return -EACCES;
|
||||
}
|
||||
|
||||
|
||||
@@ -106,13 +106,13 @@ static int action_open_plain(void)
|
||||
params.hash = NULL;
|
||||
|
||||
if ((opt_keyfile_offset || opt_keyfile_size) && opt_key_file)
|
||||
log_std(("Ignoring keyfile offset and size options, keyfile read "
|
||||
log_std(_("Ignoring keyfile offset and size options, keyfile read "
|
||||
"size is always the same as encryption key size.\n"));
|
||||
|
||||
r = crypt_parse_name_and_mode(opt_cipher ?: DEFAULT_CIPHER(PLAIN),
|
||||
cipher, NULL, cipher_mode);
|
||||
if (r < 0) {
|
||||
log_err("No known cipher specification pattern detected.\n");
|
||||
log_err(_("No known cipher specification pattern detected.\n"));
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -249,6 +249,8 @@ static int action_open_tcrypt(void)
|
||||
if (activated_name)
|
||||
r = crypt_activate_by_volume_key(cd, activated_name, NULL, 0, flags);
|
||||
out:
|
||||
if (r == -EPERM)
|
||||
log_err(_("No device header detected with this passphrase.\n"));
|
||||
crypt_free(cd);
|
||||
crypt_safe_free(CONST_CAST(char*)params.passphrase);
|
||||
return r;
|
||||
@@ -333,6 +335,8 @@ static int action_tcryptDump(void)
|
||||
else
|
||||
r = crypt_dump(cd);
|
||||
out:
|
||||
if (r == -EPERM)
|
||||
log_err(_("No device header detected with this passphrase.\n"));
|
||||
crypt_free(cd);
|
||||
crypt_safe_free(CONST_CAST(char*)params.passphrase);
|
||||
return r;
|
||||
@@ -482,7 +486,7 @@ static int action_benchmark(void)
|
||||
char *c;
|
||||
int i, r;
|
||||
|
||||
log_std("# Tests are approximate using memory only (no storage IO).\n");
|
||||
log_std(_("# Tests are approximate using memory only (no storage IO).\n"));
|
||||
if (opt_hash) {
|
||||
r = action_benchmark_kdf(opt_hash);
|
||||
} else if (opt_cipher) {
|
||||
@@ -504,7 +508,7 @@ static int action_benchmark(void)
|
||||
key_size / 8, iv_size, buffer_size,
|
||||
&enc_mbr, &dec_mbr);
|
||||
if (!r) {
|
||||
log_std("# Algorithm | Key | Encryption | Decryption\n");
|
||||
log_std(N_("# Algorithm | Key | Encryption | Decryption\n"));
|
||||
log_std("%8s-%s %4db %5.1f MiB/s %5.1f MiB/s\n",
|
||||
cipher, cipher_mode, key_size, enc_mbr, dec_mbr);
|
||||
} else if (r == -ENOENT)
|
||||
@@ -526,7 +530,7 @@ static int action_benchmark(void)
|
||||
if (r == -ENOENT)
|
||||
skipped++;
|
||||
if (i == 0)
|
||||
log_std("# Algorithm | Key | Encryption | Decryption\n");
|
||||
log_std(N_("# Algorithm | Key | Encryption | Decryption\n"));
|
||||
|
||||
snprintf(cipher, MAX_CIPHER_LEN, "%s-%s",
|
||||
bciphers[i].cipher, bciphers[i].mode);
|
||||
@@ -557,11 +561,11 @@ static int _read_mk(const char *file, char **key, int keysize)
|
||||
|
||||
fd = open(file, O_RDONLY);
|
||||
if (fd == -1) {
|
||||
log_err("Cannot read keyfile %s.\n", file);
|
||||
log_err(_("Cannot read keyfile %s.\n"), file);
|
||||
goto fail;
|
||||
}
|
||||
if ((read(fd, *key, keysize) != keysize)) {
|
||||
log_err("Cannot read %d bytes from keyfile %s.\n", keysize, file);
|
||||
log_err(_("Cannot read %d bytes from keyfile %s.\n"), keysize, file);
|
||||
close(fd);
|
||||
goto fail;
|
||||
}
|
||||
@@ -586,7 +590,7 @@ static int action_luksRepair(void)
|
||||
r = crypt_load(cd, CRYPT_LUKS1, NULL);
|
||||
crypt_set_log_callback(cd, tool_log, NULL);
|
||||
if (r == 0) {
|
||||
log_verbose( _("No known problems detected for LUKS header.\n"));
|
||||
log_verbose(_("No known problems detected for LUKS header.\n"));
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user