- undefined variable
- properly closinf file descriptorif totpology not detected
- fix IV mode to test run on RHEL5
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@201
36d66b0a-2a48-0410-832c-
cd162a569da5
if (ioctl(fd, BLKIOMIN, &min_io_size) == -1) {
log_dbg("Topology info for %s not supported, using default offset %lu bytes.",
device, default_alignment);
- return;
+ goto out;
}
/* optimal io size */
log_dbg("Topology: IO (%lu/%lu), offset = %lu; Required alignment is %lu bytes.",
min_io_size, opt_io_size, *alignment_offset, *required_alignment);
-
+out:
(void)close(fd);
}
static int _action_luksAddKey_useMK()
{
- int r = -EINVAL, keysize;
+ int r = -EINVAL, keysize = 0;
char *key = NULL;
struct crypt_device *cd = NULL;
co.size = 0;
co.offset = 444;
co.skip = 555;
- co.cipher = "aes-cbc-benbi";
+ co.cipher = "aes-cbc-essiv:sha256";
OK_(crypt_update_device(&co));
EQ_(_get_device_size(DMDIR CDEVICE_2), (orig_size - 444));
co.icb = &cmd_icb,
co.name = CDEVICE_2;
EQ_(crypt_query_device(&co), 1);
- EQ_(strcmp(co.cipher, "aes-cbc-benbi"), 0);
+ EQ_(strcmp(co.cipher, "aes-cbc-essiv:sha256"), 0);
EQ_(co.key_size, 128 / 8);
EQ_(co.offset, 444);
EQ_(co.skip, 555);