mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-05 16:00:05 +01:00
bitlk: Add warning when activating device with wrong size
This commit is contained in:
committed by
Milan Broz
parent
795b37d128
commit
f1fd38c726
@@ -1212,6 +1212,11 @@ static int _activate(struct crypt_device *cd,
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
if (dmd.size * SECTOR_SIZE != params->volume_size)
|
||||
log_std(cd, _("WARNING: BitLocker volume size %" PRIu64 " does not match the underlying device size %" PRIu64 ""),
|
||||
params->volume_size,
|
||||
dmd.size * SECTOR_SIZE);
|
||||
|
||||
/* there will be always 4 dm-zero segments: 3x metadata, 1x FS header */
|
||||
for (i = 0; i < 3; i++) {
|
||||
segments[num_segments].offset = params->metadata_offset[i] / SECTOR_SIZE;
|
||||
|
||||
Reference in New Issue
Block a user