summaryrefslogtreecommitdiffstats
path: root/applypatch/applypatch.cpp
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2018-07-12 00:13:35 +0200
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-07-12 00:13:35 +0200
commita9f9acca91d04ef5b7c626d5af65c6d399801dea (patch)
treede107da565599b010b1c991a23f82460633a215f /applypatch/applypatch.cpp
parentMerge "updater: Let read_file() return Value::Type::STRING." (diff)
parentRemove the debug code for bspatch flakiness (diff)
downloadandroid_bootable_recovery-a9f9acca91d04ef5b7c626d5af65c6d399801dea.tar
android_bootable_recovery-a9f9acca91d04ef5b7c626d5af65c6d399801dea.tar.gz
android_bootable_recovery-a9f9acca91d04ef5b7c626d5af65c6d399801dea.tar.bz2
android_bootable_recovery-a9f9acca91d04ef5b7c626d5af65c6d399801dea.tar.lz
android_bootable_recovery-a9f9acca91d04ef5b7c626d5af65c6d399801dea.tar.xz
android_bootable_recovery-a9f9acca91d04ef5b7c626d5af65c6d399801dea.tar.zst
android_bootable_recovery-a9f9acca91d04ef5b7c626d5af65c6d399801dea.zip
Diffstat (limited to 'applypatch/applypatch.cpp')
-rw-r--r--applypatch/applypatch.cpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/applypatch/applypatch.cpp b/applypatch/applypatch.cpp
index b1f5607a6..eb0a2a7b5 100644
--- a/applypatch/applypatch.cpp
+++ b/applypatch/applypatch.cpp
@@ -587,11 +587,6 @@ static int GenerateTarget(const FileContents& source_file, const std::unique_ptr
SHA_CTX ctx;
SHA1_Init(&ctx);
SinkFn sink = [&memory_sink_str, &ctx](const unsigned char* data, size_t len) {
- if (len != 0) {
- uint8_t digest[SHA_DIGEST_LENGTH];
- SHA1(data, len, digest);
- LOG(DEBUG) << "Appending " << len << " bytes data, SHA-1: " << short_sha1(digest);
- }
SHA1_Update(&ctx, data, len);
memory_sink_str.append(reinterpret_cast<const char*>(data), len);
return len;
@@ -632,14 +627,6 @@ static int GenerateTarget(const FileContents& source_file, const std::unique_ptr
<< short_sha1(bonus_digest);
}
- // TODO(b/67849209) Remove after debugging the unit test flakiness.
- if (android::base::GetMinimumLogSeverity() <= android::base::LogSeverity::DEBUG) {
- if (WriteToPartition(reinterpret_cast<const unsigned char*>(memory_sink_str.c_str()),
- memory_sink_str.size(), target_filename) != 0) {
- LOG(DEBUG) << "Failed to write patched data " << target_filename;
- }
- }
-
return 1;
} else {
LOG(INFO) << " now " << short_sha1(target_sha1);