summaryrefslogtreecommitdiffstats
path: root/updater
diff options
context:
space:
mode:
authorKelvin Zhang <zhangkelvin@google.com>2020-09-17 07:19:51 +0200
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-09-17 07:19:51 +0200
commitdf4c28991baa5f414326283821b180d9e0cddd73 (patch)
treec021e106ee6994d745ac12d70722c0b986aa13ff /updater
parent[automerger skipped] Merge mainline-release 6664920 to stage-aosp-master - DO NOT MERGE am: b3896c679e -s ours am: 7428812159 -s ours am: d757c4c90d -s ours (diff)
parentMerge "Switch to zip64 in recovery" am: a35202befd am: a973d68fcb am: 5bb0917365 (diff)
downloadandroid_bootable_recovery-df4c28991baa5f414326283821b180d9e0cddd73.tar
android_bootable_recovery-df4c28991baa5f414326283821b180d9e0cddd73.tar.gz
android_bootable_recovery-df4c28991baa5f414326283821b180d9e0cddd73.tar.bz2
android_bootable_recovery-df4c28991baa5f414326283821b180d9e0cddd73.tar.lz
android_bootable_recovery-df4c28991baa5f414326283821b180d9e0cddd73.tar.xz
android_bootable_recovery-df4c28991baa5f414326283821b180d9e0cddd73.tar.zst
android_bootable_recovery-df4c28991baa5f414326283821b180d9e0cddd73.zip
Diffstat (limited to 'updater')
-rw-r--r--updater/blockimg.cpp8
-rw-r--r--updater/install.cpp4
-rw-r--r--updater/target_files.cpp6
-rw-r--r--updater/updater.cpp2
4 files changed, 10 insertions, 10 deletions
diff --git a/updater/blockimg.cpp b/updater/blockimg.cpp
index 2d41f610b..b29aa8ce3 100644
--- a/updater/blockimg.cpp
+++ b/updater/blockimg.cpp
@@ -348,7 +348,7 @@ class RangeSinkWriter {
*/
struct NewThreadInfo {
ZipArchiveHandle za;
- ZipEntry entry;
+ ZipEntry64 entry{};
bool brotli_compressed;
std::unique_ptr<RangeSinkWriter> writer;
@@ -1626,7 +1626,7 @@ static bool Sha1DevicePath(const std::string& path, uint8_t digest[SHA_DIGEST_LE
static Value* PerformBlockImageUpdate(const char* name, State* state,
const std::vector<std::unique_ptr<Expr>>& argv,
const CommandMap& command_map, bool dryrun) {
- CommandParameters params = {};
+ CommandParameters params{};
stash_map.clear();
params.canwrite = !dryrun;
@@ -1687,7 +1687,7 @@ static Value* PerformBlockImageUpdate(const char* name, State* state,
}
std::string_view path_data(patch_data_fn->data);
- ZipEntry patch_entry;
+ ZipEntry64 patch_entry;
if (FindEntry(za, path_data, &patch_entry) != 0) {
LOG(ERROR) << name << "(): no file \"" << patch_data_fn->data << "\" in package";
return StringValue("");
@@ -1695,7 +1695,7 @@ static Value* PerformBlockImageUpdate(const char* name, State* state,
params.patch_start = updater->GetMappedPackageAddress() + patch_entry.offset;
std::string_view new_data(new_data_fn->data);
- ZipEntry new_entry;
+ ZipEntry64 new_entry;
if (FindEntry(za, new_data, &new_entry) != 0) {
LOG(ERROR) << name << "(): no file \"" << new_data_fn->data << "\" in package";
return StringValue("");
diff --git a/updater/install.cpp b/updater/install.cpp
index afa5195d0..cfa4d9d82 100644
--- a/updater/install.cpp
+++ b/updater/install.cpp
@@ -115,7 +115,7 @@ Value* PackageExtractFileFn(const char* name, State* state,
std::string dest_path = args[1];
ZipArchiveHandle za = state->updater->GetPackageHandle();
- ZipEntry entry;
+ ZipEntry64 entry;
if (FindEntry(za, zip_path, &entry) != 0) {
LOG(ERROR) << name << ": no " << zip_path << " in package";
return StringValue("");
@@ -165,7 +165,7 @@ Value* PackageExtractFileFn(const char* name, State* state,
const std::string& zip_path = args[0];
ZipArchiveHandle za = state->updater->GetPackageHandle();
- ZipEntry entry;
+ ZipEntry64 entry;
if (FindEntry(za, zip_path, &entry) != 0) {
return ErrorAbort(state, kPackageExtractFileFailure, "%s(): no %s in package", name,
zip_path.c_str());
diff --git a/updater/target_files.cpp b/updater/target_files.cpp
index 919ec4e04..951923293 100644
--- a/updater/target_files.cpp
+++ b/updater/target_files.cpp
@@ -115,7 +115,7 @@ bool TargetFile::EntryExists(const std::string_view name) const {
}
CHECK(handle_);
- ZipEntry img_entry;
+ ZipEntry64 img_entry;
return FindEntry(handle_, name, &img_entry) == 0;
}
@@ -126,7 +126,7 @@ bool TargetFile::ReadEntryToString(const std::string_view name, std::string* con
}
CHECK(handle_);
- ZipEntry entry;
+ ZipEntry64 entry;
if (auto find_err = FindEntry(handle_, name, &entry); find_err != 0) {
LOG(ERROR) << "failed to find " << name << " in the package: " << ErrorCodeString(find_err);
return false;
@@ -157,7 +157,7 @@ bool TargetFile::ExtractEntryToTempFile(const std::string_view name,
}
CHECK(handle_);
- ZipEntry entry;
+ ZipEntry64 entry;
if (auto find_err = FindEntry(handle_, name, &entry); find_err != 0) {
LOG(ERROR) << "failed to find " << name << " in the package: " << ErrorCodeString(find_err);
return false;
diff --git a/updater/updater.cpp b/updater/updater.cpp
index 8f4a6ede5..73ca0e532 100644
--- a/updater/updater.cpp
+++ b/updater/updater.cpp
@@ -163,7 +163,7 @@ void Updater::ParseAndReportErrorCode(State* state) {
bool Updater::ReadEntryToString(ZipArchiveHandle za, const std::string& entry_name,
std::string* content) {
- ZipEntry entry;
+ ZipEntry64 entry;
int find_err = FindEntry(za, entry_name, &entry);
if (find_err != 0) {
LOG(ERROR) << "failed to find " << entry_name