summaryrefslogtreecommitdiffstats
path: root/applypatch/applypatch.h
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2016-02-05 23:58:47 +0100
committerandroid-build-merger <android-build-merger@google.com>2016-02-05 23:58:47 +0100
commit715d8a203a2e7c163bda248ffc4a547c97964b33 (patch)
tree23582a18cc8422bf50410636e0d781009a3d976b /applypatch/applypatch.h
parentMerge "Refactor existing tests to use gtest" (diff)
parentMerge "applypatch: fix memory leaks reported by static analysis." (diff)
downloadandroid_bootable_recovery-715d8a203a2e7c163bda248ffc4a547c97964b33.tar
android_bootable_recovery-715d8a203a2e7c163bda248ffc4a547c97964b33.tar.gz
android_bootable_recovery-715d8a203a2e7c163bda248ffc4a547c97964b33.tar.bz2
android_bootable_recovery-715d8a203a2e7c163bda248ffc4a547c97964b33.tar.lz
android_bootable_recovery-715d8a203a2e7c163bda248ffc4a547c97964b33.tar.xz
android_bootable_recovery-715d8a203a2e7c163bda248ffc4a547c97964b33.tar.zst
android_bootable_recovery-715d8a203a2e7c163bda248ffc4a547c97964b33.zip
Diffstat (limited to '')
-rw-r--r--applypatch/applypatch.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/applypatch/applypatch.h b/applypatch/applypatch.h
index e0df104b5..14fb490ba 100644
--- a/applypatch/applypatch.h
+++ b/applypatch/applypatch.h
@@ -18,6 +18,9 @@
#define _APPLYPATCH_H
#include <sys/stat.h>
+
+#include <vector>
+
#include "openssl/sha.h"
#include "edify/expr.h"
@@ -68,22 +71,22 @@ void FreeFileContents(FileContents* file);
int FindMatchingPatch(uint8_t* sha1, char* const * const patch_sha1_str,
int num_patches);
-// bsdiff.c
+// bsdiff.cpp
void ShowBSDiffLicense();
int ApplyBSDiffPatch(const unsigned char* old_data, ssize_t old_size,
const Value* patch, ssize_t patch_offset,
SinkFn sink, void* token, SHA_CTX* ctx);
int ApplyBSDiffPatchMem(const unsigned char* old_data, ssize_t old_size,
const Value* patch, ssize_t patch_offset,
- unsigned char** new_data, ssize_t* new_size);
+ std::vector<unsigned char>* new_data);
-// imgpatch.c
+// imgpatch.cpp
int ApplyImagePatch(const unsigned char* old_data, ssize_t old_size,
const Value* patch,
SinkFn sink, void* token, SHA_CTX* ctx,
const Value* bonus_data);
-// freecache.c
+// freecache.cpp
int MakeFreeSpaceOnCache(size_t bytes_needed);
#endif