summaryrefslogtreecommitdiff
path: root/common/error_code_utils.cc
diff options
context:
space:
mode:
authorSen Jiang <senj@google.com>2017-10-31 15:14:11 -0700
committerTreehugger Robot <treehugger-gerrit@google.com>2017-11-02 21:53:57 +0000
commit02c4942cbf76441dfdc7412e5b5ae0402b313e80 (patch)
tree1f85d90f065bf0486dbe9a3b32ac10510ed2ef76 /common/error_code_utils.cc
parent13df600a35efb65c4c3858dd2e9885b504ed4cc5 (diff)
Add support for new payload property headers to delay switching slots.
Set SWITCH_SLOT_ON_REBOOT=0 to skip marking new slot as active. When ready to reboot to the new update, call applyPayload() again to switch the slots, download will be skipped because it has already finished, filesystem verification will always happen, and postinstall can be skipped if it succeeded before for this update and RUN_POST_INSTALL is set to 0. Also removed reset update progress when update succeeded to support reverting to current slot with resetStatus() without clearing download progress. If the next update is a different payload then we will still reset the progress on next update. Bug: 35212183 Test: update_device.py --extra-headers 'SWITCH_SLOT_ON_REBOOT=0' ... Merged-In: I52e2371ea4a9e6a6d026b4dd04bb1a60d95c9d5c Change-Id: I52e2371ea4a9e6a6d026b4dd04bb1a60d95c9d5c
Diffstat (limited to 'common/error_code_utils.cc')
-rw-r--r--common/error_code_utils.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/common/error_code_utils.cc b/common/error_code_utils.cc
index ad4aeeb0..983d004d 100644
--- a/common/error_code_utils.cc
+++ b/common/error_code_utils.cc
@@ -144,8 +144,10 @@ string ErrorCodeToString(ErrorCode code) {
return "ErrorCode::kUserCanceled";
case ErrorCode::kNonCriticalUpdateInOOBE:
return "ErrorCode::kNonCriticalUpdateInOOBE";
- // Don't add a default case to let the compiler warn about newly added
- // error codes which should be added here.
+ case ErrorCode::kUpdatedButNotActive:
+ return "ErrorCode::kUpdatedButNotActive";
+ // Don't add a default case to let the compiler warn about newly added
+ // error codes which should be added here.
}
return "Unknown error: " + base::UintToString(static_cast<unsigned>(code));