diff options
author | Amin Hassani <ahassani@google.com> | 2017-12-06 13:47:52 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-12-12 13:50:58 -0800 |
commit | d8b67f49d7f8ae291cd4fa901b2d3767137704e7 (patch) | |
tree | 2d039015afcd03433da0dd8860a83ce3ce2a65cf /payload_generator/ab_generator.cc | |
parent | 06c6d088b89656a120d40c4b578200c87af5c4c8 (diff) |
update_engine: Remove the duplicate BlocksInExtents
This patch removes the duplicate BlocksInExtents from extent_utils.h and fixes
the remainder of the code to reflect this change.
BUG=none
TEST=unittests pass;
Change-Id: I76f5106f75072b20cd8f41f081b2f2b07aeac9a8
Reviewed-on: https://chromium-review.googlesource.com/812009
Commit-Ready: Amin Hassani <ahassani@chromium.org>
Tested-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Alex Deymo <deymo@google.com>
Reviewed-by: Sen Jiang <senj@chromium.org>
Diffstat (limited to 'payload_generator/ab_generator.cc')
-rw-r--r-- | payload_generator/ab_generator.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/payload_generator/ab_generator.cc b/payload_generator/ab_generator.cc index f727c710..089dfd9c 100644 --- a/payload_generator/ab_generator.cc +++ b/payload_generator/ab_generator.cc @@ -272,7 +272,7 @@ bool ABGenerator::AddDataAndSetType(AnnotatedOperation* aop, vector<Extent> dst_extents; ExtentsToVector(aop->op.dst_extents(), &dst_extents); - brillo::Blob data(BlocksInExtents(dst_extents) * kBlockSize); + brillo::Blob data(utils::BlocksInExtents(dst_extents) * kBlockSize); TEST_AND_RETURN_FALSE(utils::ReadExtents(target_part_path, dst_extents, &data, @@ -306,7 +306,7 @@ bool ABGenerator::AddSourceHash(vector<AnnotatedOperation>* aops, uint64_t src_length = aop.op.has_src_length() ? aop.op.src_length() - : BlocksInExtents(aop.op.src_extents()) * kBlockSize; + : utils::BlocksInExtents(aop.op.src_extents()) * kBlockSize; TEST_AND_RETURN_FALSE(utils::ReadExtents( source_part_path, src_extents, &src_data, src_length, kBlockSize)); TEST_AND_RETURN_FALSE(HashCalculator::RawHashOfData(src_data, &src_hash)); |