summaryrefslogtreecommitdiff
path: root/applypatch/applypatch.cpp
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2018-02-03 17:20:56 -0800
committerTianjie Xu <xunchang@google.com>2018-02-12 15:19:37 -0800
commite40c80d021d667c1400b7a5d1f6d623b8450a47c (patch)
treea8f3e862ef385c608ee36bf1db2f5aa2dc13465f /applypatch/applypatch.cpp
parent5419ad31e7dafae35ab1ac9f56e234fff0c2de50 (diff)
Skip the cache size check on host
When running the update simulation, we choose to skip the cache size check for now due to the lack of "/cache" on host. And in later cls we can implement a cache size estimator to make the check more constrained. Also build the host version of support libraries. Test: unit test pass Change-Id: I3ed93c857fd02f7b62f5baba9130f75c3236e717
Diffstat (limited to 'applypatch/applypatch.cpp')
-rw-r--r--applypatch/applypatch.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/applypatch/applypatch.cpp b/applypatch/applypatch.cpp
index 04b964b1..73701abc 100644
--- a/applypatch/applypatch.cpp
+++ b/applypatch/applypatch.cpp
@@ -450,9 +450,8 @@ int CacheSizeCheck(size_t bytes) {
if (MakeFreeSpaceOnCache(bytes) < 0) {
printf("unable to make %zu bytes available on /cache\n", bytes);
return 1;
- } else {
- return 0;
}
+ return 0;
}
// This function applies binary patches to EMMC target files in a way that is safe (the original
@@ -477,7 +476,7 @@ int CacheSizeCheck(size_t bytes) {
// become obsolete since we have dropped the support for patching non-EMMC targets (EMMC targets
// have the size embedded in the filename).
int applypatch(const char* source_filename, const char* target_filename,
- const char* target_sha1_str, size_t target_size __unused,
+ const char* target_sha1_str, size_t /* target_size */,
const std::vector<std::string>& patch_sha1_str,
const std::vector<std::unique_ptr<Value>>& patch_data, const Value* bonus_data) {
printf("patch %s: ", source_filename);