Print warning if detached header path is unusable.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@636 36d66b0a-2a48-0410-832c-cd162a569da5
This commit is contained in:
Milan Broz
2011-10-10 17:38:40 +00:00
parent d6016b1c2d
commit 3b10bf9558

View File

@@ -477,12 +477,15 @@ static int action_luksFormat(int arg __attribute__((unused)))
r = crypt_parse_name_and_mode(opt_cipher ?: DEFAULT_CIPHER(LUKS1),
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;
}
if ((r = crypt_init(&cd, header_device)))
if ((r = crypt_init(&cd, header_device))) {
if (opt_header_device)
log_err(_("Cannot use %s as on-disk header.\n"), header_device);
goto out;
}
keysize = (opt_key_size ?: DEFAULT_LUKS1_KEYBITS) / 8;