Merge "fs_mgr: Do not mount empty partitions."
diff --git a/fs_mgr/fs_mgr_dm_linear.cpp b/fs_mgr/fs_mgr_dm_linear.cpp
index 94c06ba..a91e92e 100644
--- a/fs_mgr/fs_mgr_dm_linear.cpp
+++ b/fs_mgr/fs_mgr_dm_linear.cpp
@@ -110,6 +110,10 @@
return true;
}
for (const auto& partition : metadata->partitions) {
+ if (!partition.num_extents) {
+ LINFO << "Skipping zero-length logical partition: " << GetPartitionName(partition);
+ continue;
+ }
std::string path;
if (!CreateLogicalPartition(block_device, *metadata.get(), partition, false, &path)) {
LERROR << "Could not create logical partition: " << GetPartitionName(partition);