summaryrefslogtreecommitdiffstats
path: root/applypatch/applypatch.c
diff options
context:
space:
mode:
authorDoug Zongker <dougz@google.com>2014-08-20 00:53:10 +0200
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-08-19 04:43:23 +0200
commitc0fd40159cf329c54c96038d954c0b8c50a77970 (patch)
treea435cfd2bd1b457bb2e45304b8e75cd2e1305831 /applypatch/applypatch.c
parentam 2efc9d99: clear BCB in misc partition before rebooting (diff)
parentinstaller for new block OTA system (diff)
downloadandroid_bootable_recovery-c0fd40159cf329c54c96038d954c0b8c50a77970.tar
android_bootable_recovery-c0fd40159cf329c54c96038d954c0b8c50a77970.tar.gz
android_bootable_recovery-c0fd40159cf329c54c96038d954c0b8c50a77970.tar.bz2
android_bootable_recovery-c0fd40159cf329c54c96038d954c0b8c50a77970.tar.lz
android_bootable_recovery-c0fd40159cf329c54c96038d954c0b8c50a77970.tar.xz
android_bootable_recovery-c0fd40159cf329c54c96038d954c0b8c50a77970.tar.zst
android_bootable_recovery-c0fd40159cf329c54c96038d954c0b8c50a77970.zip
Diffstat (limited to 'applypatch/applypatch.c')
-rw-r--r--applypatch/applypatch.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/applypatch/applypatch.c b/applypatch/applypatch.c
index 60e9e4a5c..bfb9440e4 100644
--- a/applypatch/applypatch.c
+++ b/applypatch/applypatch.c
@@ -32,7 +32,7 @@
#include "edify/expr.h"
static int LoadPartitionContents(const char* filename, FileContents* file);
-static ssize_t FileSink(unsigned char* data, ssize_t len, void* token);
+static ssize_t FileSink(const unsigned char* data, ssize_t len, void* token);
static int GenerateTarget(FileContents* source_file,
const Value* source_patch_value,
FileContents* copy_file,
@@ -599,7 +599,7 @@ int ShowLicenses() {
return 0;
}
-ssize_t FileSink(unsigned char* data, ssize_t len, void* token) {
+ssize_t FileSink(const unsigned char* data, ssize_t len, void* token) {
int fd = *(int *)token;
ssize_t done = 0;
ssize_t wrote;
@@ -620,7 +620,7 @@ typedef struct {
ssize_t pos;
} MemorySinkInfo;
-ssize_t MemorySink(unsigned char* data, ssize_t len, void* token) {
+ssize_t MemorySink(const unsigned char* data, ssize_t len, void* token) {
MemorySinkInfo* msi = (MemorySinkInfo*)token;
if (msi->size - msi->pos < len) {
return -1;