aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deymo <deymo@google.com>2016-06-10 16:54:47 -0700
committerAlex Deymo <deymo@google.com>2016-06-15 16:03:23 -0700
commit40e13c041b07e1e1566c8de9b50cfcd6ab08649c (patch)
tree63fdcc4f6c6db2f894b536b3e0f3e807ff747c16
parent0ee98439a9f4fa1ff7a97050147d49528c99a9b3 (diff)
downloadupdate_engine-40e13c041b07e1e1566c8de9b50cfcd6ab08649c.tar.gz
Generate SOURCE_COPY and ZERO operations beyond the end of the filesystem.
This patch analyzes the whole partition size, regardless of what the size of the filesystem in the partition is. This makes the blocks in the ext2 partitions past the end of the filesystem (normally verity hashes) be compared against the old blocks and produce SOURCE_COPY operations for those as well if possible. Bug: 29272878 TEST=Generated a payload to itself of a build with verity hashes, only SOURCE_COPY (and REPLACE_BZ of zeroed blocks) are produced. (cherry picked from commit 26dd80fb16617f0d78be938a9e2592f2c0e50365) Change-Id: I266332405b752e90d18dfeb3d42aa684233b3032
-rw-r--r--payload_generator/delta_diff_utils.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/payload_generator/delta_diff_utils.cc b/payload_generator/delta_diff_utils.cc
index d4070cc4..8fce0550 100644
--- a/payload_generator/delta_diff_utils.cc
+++ b/payload_generator/delta_diff_utils.cc
@@ -180,8 +180,8 @@ bool DeltaReadPartition(vector<AnnotatedOperation>* aops,
aops,
old_part.path,
new_part.path,
- old_part.fs_interface ? old_part.fs_interface->GetBlockCount() : 0,
- new_part.fs_interface->GetBlockCount(),
+ old_part.size / kBlockSize,
+ new_part.size / kBlockSize,
soft_chunk_blocks,
version,
blob_file,