Fix previous fix - keep API logic clean, fix cryptsetup call.

Add more API regression tests.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@525 36d66b0a-2a48-0410-832c-cd162a569da5
This commit is contained in:
Milan Broz
2011-05-18 15:05:46 +00:00
parent b53b577b19
commit 9e9bf5ca56
3 changed files with 164 additions and 21 deletions

View File

@@ -263,8 +263,9 @@ static int action_create(int arg __attribute__((unused)))
goto out;
if (opt_key_file)
/* With hashing, read the whole keyfile */
r = crypt_activate_by_keyfile(cd, action_argv[0],
CRYPT_ANY_SLOT, opt_key_file, key_size,
CRYPT_ANY_SLOT, opt_key_file, params.hash ? 0 : key_size,
opt_readonly ? CRYPT_ACTIVATE_READONLY : 0);
else {
r = crypt_get_key(_("Enter passphrase: "),