Merge "Add missing report of error code under recovery"
am: 571855b0e6
Change-Id: Ib425356561060c20e0f9643e2f5b302f5c9dd161
This commit is contained in:
@@ -25,6 +25,9 @@ enum ErrorCode {
|
|||||||
kBootreasonInBlacklist,
|
kBootreasonInBlacklist,
|
||||||
kPackageCompatibilityFailure,
|
kPackageCompatibilityFailure,
|
||||||
kScriptExecutionFailure,
|
kScriptExecutionFailure,
|
||||||
|
kMapFileFailure,
|
||||||
|
kForkUpdateBinaryFailure,
|
||||||
|
kUpdateBinaryCommandFailure,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum CauseCode {
|
enum CauseCode {
|
||||||
|
|||||||
@@ -331,6 +331,7 @@ static int try_update_binary(const std::string& package, ZipArchiveHandle zip, b
|
|||||||
if (ret) {
|
if (ret) {
|
||||||
close(pipefd[0]);
|
close(pipefd[0]);
|
||||||
close(pipefd[1]);
|
close(pipefd[1]);
|
||||||
|
log_buffer->push_back(android::base::StringPrintf("error: %d", kUpdateBinaryCommandFailure));
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -395,6 +396,7 @@ static int try_update_binary(const std::string& package, ZipArchiveHandle zip, b
|
|||||||
close(pipefd[0]);
|
close(pipefd[0]);
|
||||||
close(pipefd[1]);
|
close(pipefd[1]);
|
||||||
PLOG(ERROR) << "Failed to fork update binary";
|
PLOG(ERROR) << "Failed to fork update binary";
|
||||||
|
log_buffer->push_back(android::base::StringPrintf("error: %d", kForkUpdateBinaryFailure));
|
||||||
return INSTALL_ERROR;
|
return INSTALL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -583,6 +585,7 @@ static int really_install_package(const std::string& path, bool* wipe_cache, boo
|
|||||||
MemMapping map;
|
MemMapping map;
|
||||||
if (!map.MapFile(path)) {
|
if (!map.MapFile(path)) {
|
||||||
LOG(ERROR) << "failed to map file";
|
LOG(ERROR) << "failed to map file";
|
||||||
|
log_buffer->push_back(android::base::StringPrintf("error: %d", kMapFileFailure));
|
||||||
return INSTALL_CORRUPT;
|
return INSTALL_CORRUPT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user