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
diff --git a/fs_mgr/liblp/writer.cpp b/fs_mgr/liblp/writer.cpp
index 2708efa..7db0b78 100644
--- a/fs_mgr/liblp/writer.cpp
+++ b/fs_mgr/liblp/writer.cpp
@@ -138,8 +138,8 @@
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;
}