Fix minor errors

- 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
This commit is contained in:
Milan Broz
2010-04-16 14:51:09 +00:00
parent 566f48f7a4
commit 17c87c1148
3 changed files with 5 additions and 5 deletions

View File

@@ -713,7 +713,7 @@ void get_topology_alignment(const char *device,
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 */
@@ -734,6 +734,6 @@ void get_topology_alignment(const char *device,
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);
}

View File

@@ -459,7 +459,7 @@ static int action_luksRemoveKey(int arg)
static int _action_luksAddKey_useMK()
{
int r = -EINVAL, keysize;
int r = -EINVAL, keysize = 0;
char *key = NULL;
struct crypt_device *cd = NULL;

View File

@@ -473,7 +473,7 @@ void DeviceResizeGame(void)
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));
@@ -481,7 +481,7 @@ void DeviceResizeGame(void)
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);