summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2017-08-25 00:10:25 +0200
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-08-25 00:10:25 +0200
commit571855b0e6e8046f19f4c623df22db1b6a6cdaee (patch)
treef52302c856fff9d699748de2ec98bd76c17ba40d
parentMerge "Allow comparison against multi serial nums for A/B package" (diff)
parentAdd missing report of error code under recovery (diff)
downloadandroid_bootable_recovery-571855b0e6e8046f19f4c623df22db1b6a6cdaee.tar
android_bootable_recovery-571855b0e6e8046f19f4c623df22db1b6a6cdaee.tar.gz
android_bootable_recovery-571855b0e6e8046f19f4c623df22db1b6a6cdaee.tar.bz2
android_bootable_recovery-571855b0e6e8046f19f4c623df22db1b6a6cdaee.tar.lz
android_bootable_recovery-571855b0e6e8046f19f4c623df22db1b6a6cdaee.tar.xz
android_bootable_recovery-571855b0e6e8046f19f4c623df22db1b6a6cdaee.tar.zst
android_bootable_recovery-571855b0e6e8046f19f4c623df22db1b6a6cdaee.zip
Diffstat (limited to '')
-rw-r--r--error_code.h3
-rw-r--r--install.cpp3
2 files changed, 6 insertions, 0 deletions
diff --git a/error_code.h b/error_code.h
index 4cbad4cfe..4e3032bc9 100644
--- a/error_code.h
+++ b/error_code.h
@@ -25,6 +25,9 @@ enum ErrorCode {
kBootreasonInBlacklist,
kPackageCompatibilityFailure,
kScriptExecutionFailure,
+ kMapFileFailure,
+ kForkUpdateBinaryFailure,
+ kUpdateBinaryCommandFailure,
};
enum CauseCode {
diff --git a/install.cpp b/install.cpp
index 1220c6ab7..586dbbe2c 100644
--- a/install.cpp
+++ b/install.cpp
@@ -331,6 +331,7 @@ static int try_update_binary(const std::string& package, ZipArchiveHandle zip, b
if (ret) {
close(pipefd[0]);
close(pipefd[1]);
+ log_buffer->push_back(android::base::StringPrintf("error: %d", kUpdateBinaryCommandFailure));
return ret;
}
@@ -395,6 +396,7 @@ static int try_update_binary(const std::string& package, ZipArchiveHandle zip, b
close(pipefd[0]);
close(pipefd[1]);
PLOG(ERROR) << "Failed to fork update binary";
+ log_buffer->push_back(android::base::StringPrintf("error: %d", kForkUpdateBinaryFailure));
return INSTALL_ERROR;
}
@@ -583,6 +585,7 @@ static int really_install_package(const std::string& path, bool* wipe_cache, boo
MemMapping map;
if (!map.MapFile(path)) {
LOG(ERROR) << "failed to map file";
+ log_buffer->push_back(android::base::StringPrintf("error: %d", kMapFileFailure));
return INSTALL_CORRUPT;
}