From a3ccba6d314cb29b02d1dbda9a71427b11da936d Mon Sep 17 00:00:00 2001 From: Doug Zongker Date: Mon, 20 Aug 2012 15:28:02 -0700 Subject: add bonus data feature to imgdiff/imgpatch/applypatch The bonus data option lets you give an additional blob of uncompressed data to be used when constructing a patch for chunk #1 of an image. The same blob must be available at patch time, and can be passed to the command-line applypatch tool (this feature is not accessible from edify scripts). This will be used to reduce the size of recovery-from-boot patches by storing parts of the recovery ramdisk (the UI images) on the system partition. Change-Id: Iac1959cdf7f5e4582f8d434e83456e483b64c02c --- applypatch/applypatch.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'applypatch/applypatch.h') diff --git a/applypatch/applypatch.h b/applypatch/applypatch.h index fb58843ba..d1a023293 100644 --- a/applypatch/applypatch.h +++ b/applypatch/applypatch.h @@ -55,7 +55,8 @@ int applypatch(const char* source_filename, size_t target_size, int num_patches, char** const patch_sha1_str, - Value** patch_data); + Value** patch_data, + Value* bonus_data); int applypatch_check(const char* filename, int num_patches, char** const patch_sha1_str); @@ -79,7 +80,8 @@ int ApplyBSDiffPatchMem(const unsigned char* old_data, ssize_t old_size, // imgpatch.c int ApplyImagePatch(const unsigned char* old_data, ssize_t old_size, const Value* patch, - SinkFn sink, void* token, SHA_CTX* ctx); + SinkFn sink, void* token, SHA_CTX* ctx, + const Value* bonus_data); // freecache.c int MakeFreeSpaceOnCache(size_t bytes_needed); -- cgit v1.2.3