Loading fs_mgr/liblp/writer.cpp +8 −2 Original line number Diff line number Diff line Loading @@ -83,8 +83,9 @@ std::string SerializeMetadata(const LpMetadata& input) { // Perform sanity checks so we don't accidentally overwrite valid metadata // with potentially invalid metadata, or random partition data with metadata. static bool ValidateAndSerializeMetadata(const IPartitionOpener& opener, const LpMetadata& metadata, const std::string& slot_suffix, std::string* blob) { static bool ValidateAndSerializeMetadata([[maybe_unused]] const IPartitionOpener& opener, const LpMetadata& metadata, const std::string& slot_suffix, std::string* blob) { const LpMetadataGeometry& geometry = metadata.geometry; *blob = SerializeMetadata(metadata); Loading Loading @@ -128,6 +129,10 @@ static bool ValidateAndSerializeMetadata(const IPartitionOpener& opener, const L << block_device.first_logical_sector << " for size " << block_device.size; return false; } // When flashing on the device, check partition sizes. Don't do this on // the host since there is no way to verify. #if defined(__ANDROID__) BlockDeviceInfo info; if (!opener.GetInfo(partition_name, &info)) { PERROR << partition_name << ": ioctl"; Loading @@ -138,6 +143,7 @@ static bool ValidateAndSerializeMetadata(const IPartitionOpener& opener, const L << block_device.size << ", got " << info.size << ")"; return false; } #endif } // Make sure all partition entries reference valid extents. Loading Loading
fs_mgr/liblp/writer.cpp +8 −2 Original line number Diff line number Diff line Loading @@ -83,8 +83,9 @@ std::string SerializeMetadata(const LpMetadata& input) { // Perform sanity checks so we don't accidentally overwrite valid metadata // with potentially invalid metadata, or random partition data with metadata. static bool ValidateAndSerializeMetadata(const IPartitionOpener& opener, const LpMetadata& metadata, const std::string& slot_suffix, std::string* blob) { static bool ValidateAndSerializeMetadata([[maybe_unused]] const IPartitionOpener& opener, const LpMetadata& metadata, const std::string& slot_suffix, std::string* blob) { const LpMetadataGeometry& geometry = metadata.geometry; *blob = SerializeMetadata(metadata); Loading Loading @@ -128,6 +129,10 @@ static bool ValidateAndSerializeMetadata(const IPartitionOpener& opener, const L << block_device.first_logical_sector << " for size " << block_device.size; return false; } // When flashing on the device, check partition sizes. Don't do this on // the host since there is no way to verify. #if defined(__ANDROID__) BlockDeviceInfo info; if (!opener.GetInfo(partition_name, &info)) { PERROR << partition_name << ": ioctl"; Loading @@ -138,6 +143,7 @@ static bool ValidateAndSerializeMetadata(const IPartitionOpener& opener, const L << block_device.size << ", got " << info.size << ")"; return false; } #endif } // Make sure all partition entries reference valid extents. Loading