summaryrefslogtreecommitdiffstats
path: root/applypatch/include/applypatch/applypatch.h
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2017-11-06 20:04:34 +0100
committerandroid-build-merger <android-build-merger@google.com>2017-11-06 20:04:34 +0100
commit16a4cbe79b3b8a010f783a4ea7121f90a844cc0a (patch)
treea9a7e7a70e52ac3f64c08e8bb99a9a907976a1b6 /applypatch/include/applypatch/applypatch.h
parentMerge "Clean up fuse_sideload and add a testcase." am: 73dca3e983 (diff)
parentMerge "Switch to bionic gtest in bootable/recovery" (diff)
downloadandroid_bootable_recovery-16a4cbe79b3b8a010f783a4ea7121f90a844cc0a.tar
android_bootable_recovery-16a4cbe79b3b8a010f783a4ea7121f90a844cc0a.tar.gz
android_bootable_recovery-16a4cbe79b3b8a010f783a4ea7121f90a844cc0a.tar.bz2
android_bootable_recovery-16a4cbe79b3b8a010f783a4ea7121f90a844cc0a.tar.lz
android_bootable_recovery-16a4cbe79b3b8a010f783a4ea7121f90a844cc0a.tar.xz
android_bootable_recovery-16a4cbe79b3b8a010f783a4ea7121f90a844cc0a.tar.zst
android_bootable_recovery-16a4cbe79b3b8a010f783a4ea7121f90a844cc0a.zip
Diffstat (limited to 'applypatch/include/applypatch/applypatch.h')
-rw-r--r--applypatch/include/applypatch/applypatch.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/applypatch/include/applypatch/applypatch.h b/applypatch/include/applypatch/applypatch.h
index 2a3b3ef39..bcb8a4126 100644
--- a/applypatch/include/applypatch/applypatch.h
+++ b/applypatch/include/applypatch/applypatch.h
@@ -36,12 +36,11 @@ struct FileContents {
struct stat st;
};
-// 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
-// it to free up space. If the expected source file doesn't exist, or
-// is corrupted, we look to see if this file contains the bits we want
-// and use it as the source instead.
-#define CACHE_TEMP_SOURCE "/cache/saved.file"
+// 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 it to free up space. If the expected source file doesn't
+// exist, or is corrupted, we look to see if the cached file contains the bits we want and use it as
+// the source instead. The default location for the cached source is "/cache/saved.file".
+extern std::string cache_temp_source;
using SinkFn = std::function<size_t(const unsigned char*, size_t)>;