Fix size argument for create command. (regression in 1.2.0)

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@518 36d66b0a-2a48-0410-832c-cd162a569da5
This commit is contained in:
Milan Broz
2011-05-03 13:13:16 +00:00
parent 35d6914779
commit afd526a8c4
5 changed files with 21 additions and 3 deletions

View File

@@ -279,6 +279,14 @@ static int action_create(int arg __attribute__((unused)))
CRYPT_ANY_SLOT, password, passwordLen,
opt_readonly ? CRYPT_ACTIVATE_READONLY : 0);
}
/* FIXME: workaround, new api missing format parameter for size.
* Properly fix it after bumping library version,
* add start_offset and size into "PLAIN" format specifiers.
*/
if (r >= 0 && opt_size)
r = crypt_resize(cd, action_argv[0], opt_size);
out:
crypt_free(cd);
crypt_safe_free(password);