"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/utils_wipe.c" between
cryptsetup-2.3.6.tar.xz and cryptsetup-2.4.0.tar.xz

About: cryptsetup is a utility used to conveniently setup disk encryption based on the dm-crypt kernel module. These include plain dm-crypt volumes, LUKS volumes, loop-AES and TrueCrypt compatible format.

utils_wipe.c  (cryptsetup-2.3.6.tar.xz):utils_wipe.c  (cryptsetup-2.4.0.tar.xz)
skipping to change at line 153 skipping to change at line 153
char *sf = NULL; char *sf = NULL;
uint64_t dev_size; uint64_t dev_size;
bool need_block_init = true; bool need_block_init = true;
/* Note: LUKS1 calls it with wipe_block not aligned to multiple of bsize */ /* Note: LUKS1 calls it with wipe_block not aligned to multiple of bsize */
bsize = device_block_size(cd, device); bsize = device_block_size(cd, device);
alignment = device_alignment(device); alignment = device_alignment(device);
if (!bsize || !alignment || !wipe_block_size) if (!bsize || !alignment || !wipe_block_size)
return -EINVAL; return -EINVAL;
/* FIXME: if wipe_block_size < bsize, then a wipe is highly ineffective * / /* if wipe_block_size < bsize, then a wipe is highly ineffective */
/* Everything must be aligned to SECTOR_SIZE */ /* Everything must be aligned to SECTOR_SIZE */
if (MISALIGNED_512(offset) || MISALIGNED_512(length) || MISALIGNED_512(wi pe_block_size)) if (MISALIGNED_512(offset) || MISALIGNED_512(length) || MISALIGNED_512(wi pe_block_size))
return -EINVAL; return -EINVAL;
if (device_is_locked(device)) if (device_is_locked(device))
devfd = device_open_locked(cd, device, O_RDWR); devfd = device_open_locked(cd, device, O_RDWR);
else else
devfd = device_open(cd, device, O_RDWR); devfd = device_open(cd, device, O_RDWR);
if (devfd < 0) if (devfd < 0)
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)