liblp: Allow to flash on bigger block device

Needed for using Retrofit Dynamic Partitions on unified targets, which has different partition sizes on different devices.

Change-Id: I2b4c05401569ce5fc301ebafa7d130c3b0d87c64
This commit is contained in:
me-cafebabe 2022-07-16 20:10:52 +00:00 committed by zlewchan
parent 85a30f4c86
commit 9ee2afd3b5

View file

@ -138,8 +138,8 @@ static bool ValidateAndSerializeMetadata([[maybe_unused]] const IPartitionOpener
PERROR << partition_name << ": ioctl";
return false;
}
if (info.size != block_device.size) {
LERROR << "Block device " << partition_name << " size mismatch (expected"
if (info.size < block_device.size) {
LERROR << "Block device " << partition_name << " size is too small (expected"
<< block_device.size << ", got " << info.size << ")";
return false;
}