summaryrefslogtreecommitdiffstats
path: root/applypatch/include
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2018-07-07 08:18:14 +0200
committerTao Bao <tbao@google.com>2018-07-10 06:13:56 +0200
commit7c1d426dbc4f5539929247027e4bd1c33ec63471 (patch)
tree21a44d8e8727d95197bc7acd5bd9cafac3b8eef4 /applypatch/include
parentMerge "updater: Remove the support for sha1_check()." (diff)
downloadandroid_bootable_recovery-7c1d426dbc4f5539929247027e4bd1c33ec63471.tar
android_bootable_recovery-7c1d426dbc4f5539929247027e4bd1c33ec63471.tar.gz
android_bootable_recovery-7c1d426dbc4f5539929247027e4bd1c33ec63471.tar.bz2
android_bootable_recovery-7c1d426dbc4f5539929247027e4bd1c33ec63471.tar.lz
android_bootable_recovery-7c1d426dbc4f5539929247027e4bd1c33ec63471.tar.xz
android_bootable_recovery-7c1d426dbc4f5539929247027e4bd1c33ec63471.tar.zst
android_bootable_recovery-7c1d426dbc4f5539929247027e4bd1c33ec63471.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 f074e3681..92db59c3a 100644
--- a/applypatch/include/applypatch/applypatch.h
+++ b/applypatch/include/applypatch/applypatch.h
@@ -78,9 +78,10 @@ int applypatch(const char* source_filename, const char* target_filename,
const std::vector<std::string>& patch_sha1s,
const std::vector<std::unique_ptr<Value>>& patch_data, const Value* bonus_data);
-// Returns 0 if the contents of the file or the cached file match any of the given SHA-1's. Returns
-// nonzero otherwise.
-int applypatch_check(const char* filename, const std::vector<std::string>& patch_sha1s);
+// Returns 0 if the contents of the eMMC target or the cached file match any of the given SHA-1's.
+// Returns nonzero otherwise. 'filename' must refer to an eMMC partition target. It would only use
+// 'sha1s' to find a match on /cache if the hashes embedded in the filename fail to match.
+int applypatch_check(const std::string& filename, const std::vector<std::string>& sha1s);
// Flashes a given image to the target partition. It verifies the target cheksum first, and will
// return if target already has the desired hash. Otherwise it checks the checksum of the given