diff options
author | Amin Hassani <ahassani@chromium.org> | 2020-09-16 11:19:28 -0700 |
---|---|---|
committer | Amin Hassani <ahassani@chromium.org> | 2020-09-17 10:17:36 -0700 |
commit | e53b39b8b9c5c0871841bbbb86f23657c0b7f91b (patch) | |
tree | 12746e5e7e4716ba7fc94d3ed5c1a36c4d47d474 /payload_generator/delta_diff_utils.cc | |
parent | a02a1f1dc837f22226499d9856a949fb180d099a (diff) | |
parent | 9956320ffa4edb340d20bd7f3c852a9e87437bd3 (diff) |
update_engine: Merge remote-tracking branch 'cros/upstream' into cros/master
Done with:
git merge cros/upstream --commit -s recursive
- Added EC key support and its unittests.
- Resolved a conlict on error codes. Since Android versions are not
uploading any UMA metrics, I gave the priority to the Android version
Since they can't be changed.
- Changed the openssl functions to get1 version (from get0) version
because of a current issue with gale. Once the issue is resolved we
need to change them back.
- Some remaining styling issues fixed by clang-format
BUG=b:163153182
TEST=CQ passes
TEST=unittests
Change-Id: Ib95034422b92433ce26e28336bc4806b34910d38
Diffstat (limited to 'payload_generator/delta_diff_utils.cc')
-rw-r--r-- | payload_generator/delta_diff_utils.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/payload_generator/delta_diff_utils.cc b/payload_generator/delta_diff_utils.cc index ded30fb6..220c7ae1 100644 --- a/payload_generator/delta_diff_utils.cc +++ b/payload_generator/delta_diff_utils.cc @@ -637,7 +637,7 @@ bool DeltaReadFile(vector<AnnotatedOperation>* aops, bool GenerateBestFullOperation(const brillo::Blob& new_data, const PayloadVersion& version, brillo::Blob* out_blob, - InstallOperation_Type* out_type) { + InstallOperation::Type* out_type) { if (new_data.empty()) return false; @@ -739,7 +739,7 @@ bool ReadExtentsToDiff(const string& old_part, // Try generating a full operation for the given new data, regardless of the // old_data. - InstallOperation_Type op_type; + InstallOperation::Type op_type; TEST_AND_RETURN_FALSE( GenerateBestFullOperation(new_data, version, &data_blob, &op_type)); operation.set_type(op_type); @@ -766,7 +766,7 @@ bool ReadExtentsToDiff(const string& old_part, ScopedPathUnlinker unlinker(patch.value()); std::unique_ptr<bsdiff::PatchWriterInterface> bsdiff_patch_writer; - InstallOperation_Type operation_type = InstallOperation::SOURCE_BSDIFF; + InstallOperation::Type operation_type = InstallOperation::SOURCE_BSDIFF; if (version.OperationAllowed(InstallOperation::BROTLI_BSDIFF)) { bsdiff_patch_writer = bsdiff::CreateBSDF2PatchWriter(patch.value(), @@ -872,13 +872,13 @@ bool ReadExtentsToDiff(const string& old_part, return true; } -bool IsAReplaceOperation(InstallOperation_Type op_type) { +bool IsAReplaceOperation(InstallOperation::Type op_type) { return (op_type == InstallOperation::REPLACE || op_type == InstallOperation::REPLACE_BZ || op_type == InstallOperation::REPLACE_XZ); } -bool IsNoSourceOperation(InstallOperation_Type op_type) { +bool IsNoSourceOperation(InstallOperation::Type op_type) { return (IsAReplaceOperation(op_type) || op_type == InstallOperation::ZERO || op_type == InstallOperation::DISCARD); } @@ -938,7 +938,7 @@ bool IsExtFilesystem(const string& device) { if (magic != EXT2_SUPER_MAGIC) return false; - // Sanity check the parameters. + // Validation check the parameters. TEST_AND_RETURN_FALSE(log_block_size >= EXT2_MIN_BLOCK_LOG_SIZE && log_block_size <= EXT2_MAX_BLOCK_LOG_SIZE); TEST_AND_RETURN_FALSE(block_count > 0); |