Improve error message when hitting checksum mismatch
Bug: 141931619
Test: Run existing unittests
Change-Id: Icc0301d4c83d45f233e226f48059ec235c87376f
diff --git a/payload_consumer/delta_performer.cc b/payload_consumer/delta_performer.cc
index 4690d85..19d1297 100644
--- a/payload_consumer/delta_performer.cc
+++ b/payload_consumer/delta_performer.cc
@@ -1152,7 +1152,8 @@
}
if (read_ok && expected_source_hash == source_hash)
return true;
-
+ LOG(WARNING) << "Source hash from RAW device mismatched, attempting to "
+ "correct using ECC";
if (!OpenCurrentECCPartition()) {
// The following function call will return false since the source hash
// mismatches, but we still want to call it so it prints the appropriate
@@ -1165,7 +1166,6 @@
<< ", expected "
<< base::HexEncode(expected_source_hash.data(),
expected_source_hash.size());
-
if (should_optimize) {
TEST_AND_RETURN_FALSE(fd_utils::ReadAndHashExtents(
source_ecc_fd_, operation.src_extents(), block_size_, &source_hash));