diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-07-23 12:38:03 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-07-23 12:38:03 -0700 |
commit | 4d7c4348077b0f1a713ebffe59b458a5d95fba11 (patch) | |
tree | aafe3da68de5bcdfe24d737382730a69a0054b19 /tools/applypatch/bsdiff.c | |
parent | 076f0bfbab74f725f2c643b8639efe2bb05a0f61 (diff) | |
parent | 6c770467fb4faad2c252c9c1b881ec0f253a3059 (diff) | |
download | build-4d7c4348077b0f1a713ebffe59b458a5d95fba11.zip build-4d7c4348077b0f1a713ebffe59b458a5d95fba11.tar.gz build-4d7c4348077b0f1a713ebffe59b458a5d95fba11.tar.bz2 |
Merge change 8295 into donut
* changes:
applypatch changes for patching recovery image
Diffstat (limited to 'tools/applypatch/bsdiff.c')
-rw-r--r-- | tools/applypatch/bsdiff.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/applypatch/bsdiff.c b/tools/applypatch/bsdiff.c index 9d55f3b..d5cd617 100644 --- a/tools/applypatch/bsdiff.c +++ b/tools/applypatch/bsdiff.c @@ -84,7 +84,7 @@ static off_t offtin(u_char *buf) int ApplyBSDiffPatch(const unsigned char* old_data, ssize_t old_size, const char* patch_filename, ssize_t patch_offset, - FILE* output, SHA_CTX* ctx) { + SinkFn sink, void* token, SHA_CTX* ctx) { unsigned char* new_data; ssize_t new_size; @@ -93,7 +93,7 @@ int ApplyBSDiffPatch(const unsigned char* old_data, ssize_t old_size, return -1; } - if (fwrite(new_data, 1, new_size, output) < new_size) { + if (sink(new_data, new_size, token) < new_size) { fprintf(stderr, "short write of output: %d (%s)\n", errno, strerror(errno)); return 1; } |