summaryrefslogtreecommitdiffstats
path: root/applypatch/applypatch.h
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2016-02-11 01:41:10 +0100
committerYabin Cui <yabinc@google.com>2016-02-12 03:10:31 +0100
commitd6c93afcc28cc65217ba65eeb646009c4f15a2ad (patch)
tree7de6bb409c2d741e9bb3922ab79e446090baacdd /applypatch/applypatch.h
parentMerge "IO fault injection for OTA packages" (diff)
downloadandroid_bootable_recovery-d6c93afcc28cc65217ba65eeb646009c4f15a2ad.tar
android_bootable_recovery-d6c93afcc28cc65217ba65eeb646009c4f15a2ad.tar.gz
android_bootable_recovery-d6c93afcc28cc65217ba65eeb646009c4f15a2ad.tar.bz2
android_bootable_recovery-d6c93afcc28cc65217ba65eeb646009c4f15a2ad.tar.lz
android_bootable_recovery-d6c93afcc28cc65217ba65eeb646009c4f15a2ad.tar.xz
android_bootable_recovery-d6c93afcc28cc65217ba65eeb646009c4f15a2ad.tar.zst
android_bootable_recovery-d6c93afcc28cc65217ba65eeb646009c4f15a2ad.zip
Diffstat (limited to 'applypatch/applypatch.h')
-rw-r--r--applypatch/applypatch.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/applypatch/applypatch.h b/applypatch/applypatch.h
index 096596f03..9ee39d293 100644
--- a/applypatch/applypatch.h
+++ b/applypatch/applypatch.h
@@ -25,17 +25,11 @@
#include "openssl/sha.h"
#include "edify/expr.h"
-typedef struct _Patch {
+struct FileContents {
uint8_t sha1[SHA_DIGEST_LENGTH];
- const char* patch_filename;
-} Patch;
-
-typedef struct _FileContents {
- uint8_t sha1[SHA_DIGEST_LENGTH];
- unsigned char* data;
- ssize_t size;
+ std::vector<unsigned char> data;
struct stat st;
-} FileContents;
+};
// When there isn't enough room on the target filesystem to hold the
// patched version of the file, we copy the original here and delete