mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-17 05:40:13 +01:00
Add utils_crypt file and test for supported modes presentation.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@348 36d66b0a-2a48-0410-832c-cd162a569da5
This commit is contained in:
@@ -348,11 +348,11 @@ static int _action_luksFormat_useMK()
|
||||
.data_alignment = opt_align_payload,
|
||||
};
|
||||
|
||||
if (sscanf(opt_cipher ?: DEFAULT_CIPHER(LUKS1),
|
||||
"%" MAX_CIPHER_LEN_STR "[^-]-%" MAX_CIPHER_LEN_STR "s",
|
||||
cipher, cipher_mode) != 2) {
|
||||
r = crypt_parse_name_and_mode(opt_cipher ?: DEFAULT_CIPHER(LUKS1),
|
||||
cipher, cipher_mode);
|
||||
if (r < 0) {
|
||||
log_err("No known cipher specification pattern detected.\n");
|
||||
return -EINVAL;
|
||||
return r;
|
||||
}
|
||||
|
||||
keysize = (opt_key_size ?: DEFAULT_LUKS1_KEYBITS) / 8;
|
||||
|
||||
Reference in New Issue
Block a user