summaryrefslogtreecommitdiffstats
path: root/applypatch/include
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2019-09-23 19:28:54 +0200
committerTao Bao <tbao@google.com>2019-09-23 20:26:48 +0200
commit5234ad466c7006430fcd62f0f0ceeb768da5ec93 (patch)
treeb7ab0af76118d4227d58c098c5db7991ece384b9 /applypatch/include
parentapplypatch: Use static libs for libbrotli and libbz. (diff)
downloadandroid_bootable_recovery-5234ad466c7006430fcd62f0f0ceeb768da5ec93.tar
android_bootable_recovery-5234ad466c7006430fcd62f0f0ceeb768da5ec93.tar.gz
android_bootable_recovery-5234ad466c7006430fcd62f0f0ceeb768da5ec93.tar.bz2
android_bootable_recovery-5234ad466c7006430fcd62f0f0ceeb768da5ec93.tar.lz
android_bootable_recovery-5234ad466c7006430fcd62f0f0ceeb768da5ec93.tar.xz
android_bootable_recovery-5234ad466c7006430fcd62f0f0ceeb768da5ec93.tar.zst
android_bootable_recovery-5234ad466c7006430fcd62f0f0ceeb768da5ec93.zip
Diffstat (limited to 'applypatch/include')
-rw-r--r--applypatch/include/applypatch/applypatch.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/applypatch/include/applypatch/applypatch.h b/applypatch/include/applypatch/applypatch.h
index 6fc6f0fc9..799f4b2d7 100644
--- a/applypatch/include/applypatch/applypatch.h
+++ b/applypatch/include/applypatch/applypatch.h
@@ -73,10 +73,11 @@ std::ostream& operator<<(std::ostream& os, const Partition& partition);
// the 'target' Partition. While patching, it will backup the data on the source partition to
// /cache, so that the patching could be resumed on interruption even if both of the source and
// target partitions refer to the same device. The function is idempotent if called multiple times.
-// An optional arg 'bonus' can be provided, if the patch was generated with a bonus output.
-// Returns the patching result.
+// 'bonus' can be provided if the patch was generated with a bonus output, or nullptr.
+// 'backup_source' indicates whether the source partition should be backed up prior to the update
+// (e.g. when doing in-place update). Returns the patching result.
bool PatchPartition(const Partition& target, const Partition& source, const Value& patch,
- const Value* bonus);
+ const Value* bonus, bool backup_source);
// Returns whether the contents of the eMMC target or the cached file match the embedded hash.
// It will look for the backup on /cache if the given partition doesn't match the checksum.