summaryrefslogtreecommitdiffstats
path: root/updater
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2017-05-03 01:07:18 +0200
committerTianjie Xu <xunchang@google.com>2017-05-03 07:52:03 +0200
commite0c88793d184648a8d08b5d925b21cc6c9623ffc (patch)
treeef054fd1d7c3e2061dec1b5a4748830c723977de /updater
parentMerge "Separate libupdate_verifier module and add testcases." (diff)
downloadandroid_bootable_recovery-e0c88793d184648a8d08b5d925b21cc6c9623ffc.tar
android_bootable_recovery-e0c88793d184648a8d08b5d925b21cc6c9623ffc.tar.gz
android_bootable_recovery-e0c88793d184648a8d08b5d925b21cc6c9623ffc.tar.bz2
android_bootable_recovery-e0c88793d184648a8d08b5d925b21cc6c9623ffc.tar.lz
android_bootable_recovery-e0c88793d184648a8d08b5d925b21cc6c9623ffc.tar.xz
android_bootable_recovery-e0c88793d184648a8d08b5d925b21cc6c9623ffc.tar.zst
android_bootable_recovery-e0c88793d184648a8d08b5d925b21cc6c9623ffc.zip
Diffstat (limited to 'updater')
-rw-r--r--updater/updater.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/updater/updater.cpp b/updater/updater.cpp
index c09e267a5..37e003e66 100644
--- a/updater/updater.cpp
+++ b/updater/updater.cpp
@@ -193,13 +193,15 @@ int main(int argc, char** argv) {
}
}
- if (state.error_code != kNoError) {
- fprintf(cmd_pipe, "log error: %d\n", state.error_code);
- // Cause code should provide additional information about the abort;
- // report only when an error exists.
- if (state.cause_code != kNoCause) {
- fprintf(cmd_pipe, "log cause: %d\n", state.cause_code);
- }
+ // Installation has been aborted. Set the error code to kScriptExecutionFailure unless
+ // a more specific code has been set in errmsg.
+ if (state.error_code == kNoError) {
+ state.error_code = kScriptExecutionFailure;
+ }
+ fprintf(cmd_pipe, "log error: %d\n", state.error_code);
+ // Cause code should provide additional information about the abort.
+ if (state.cause_code != kNoCause) {
+ fprintf(cmd_pipe, "log cause: %d\n", state.cause_code);
}
if (updater_info.package_zip) {