From 6e293c99c1c8818fd28edc8dcfc13b5e4f048188 Mon Sep 17 00:00:00 2001 From: Tianjie Xu Date: Wed, 15 Nov 2017 16:26:41 -0800 Subject: Switch imgdiff to libbase logging Also add a verbose option. And we won't print messages of 'info' severity unless '-v' is present. Test: run imgdiff and check the logs. Change-Id: I1b90874baea8e72e2a2323a0b63bc5d35e653e6b --- applypatch/include/applypatch/imgdiff_image.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'applypatch/include') diff --git a/applypatch/include/applypatch/imgdiff_image.h b/applypatch/include/applypatch/imgdiff_image.h index 00a84f3a9..0f74420f0 100644 --- a/applypatch/include/applypatch/imgdiff_image.h +++ b/applypatch/include/applypatch/imgdiff_image.h @@ -62,10 +62,7 @@ class ImageChunk { const uint8_t* DataForPatch() const; size_t DataLengthForPatch() const; - void Dump() const { - printf("type: %d, start: %zu, len: %zu, name: %s\n", type_, start_, DataLengthForPatch(), - entry_name_.c_str()); - } + void Dump(size_t index) const; void SetUncompressedData(std::vector data); bool SetBonusData(const std::vector& bonus_data); @@ -140,7 +137,7 @@ class PatchChunk { private: size_t GetHeaderSize() const; - size_t WriteHeaderToFd(int fd, size_t offset) const; + size_t WriteHeaderToFd(int fd, size_t offset, size_t index) const; // The patch chunk type is the same as the target chunk type. The only exception is we change // the |type_| to CHUNK_RAW if target length is smaller than the patch size. -- cgit v1.2.3