summaryrefslogtreecommitdiff
path: root/common/error_code_utils.cc
diff options
context:
space:
mode:
authorMarton Hunyady <hunyadym@chromium.org>2018-05-07 19:08:48 +0200
committerchrome-bot <chrome-bot@chromium.org>2018-05-14 15:32:51 -0700
commit199152d68931cbbffa8b4e3cb34b2ef70c19e8b6 (patch)
tree68c1cad6d5daea07e177cace968c578e96c49133 /common/error_code_utils.cc
parent3978dddfac37ddbb5c1690e399ba474f32c70294 (diff)
update_engine: Process Omaha response for rollback images
Omaha returns whether the image returned is a rollback in the _rollback="true" argument. If this is set, the client has to check whether it's OK to apply the rollback image (policy is specifically requesting a rollback and verified boot will accept the image based on its kernel and firmware key versions). In addition to this, the device has to do a safe powerwash if the image is a rollback. (We're not supporting rollbacks with partial or no powerwash yet.) We're also setting the rollback_happened preference to avoid force updates happening before the policy is available again. Chromium CL adding the error code: http://crrev.com/c/1047866 BUG=chromium:840432 TEST='cros_run_unit_tests --board=caroline --packages update_engine' Change-Id: I1436ca96211b2a8523e78bf83602ef8b6b525570 Reviewed-on: https://chromium-review.googlesource.com/1047610 Commit-Ready: Marton Hunyady <hunyadym@chromium.org> Tested-by: Marton Hunyady <hunyadym@chromium.org> Reviewed-by: Amin Hassani <ahassani@chromium.org>
Diffstat (limited to 'common/error_code_utils.cc')
-rw-r--r--common/error_code_utils.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/error_code_utils.cc b/common/error_code_utils.cc
index 6b72eee8..a0e75f0e 100644
--- a/common/error_code_utils.cc
+++ b/common/error_code_utils.cc
@@ -150,6 +150,8 @@ string ErrorCodeToString(ErrorCode code) {
return "ErrorCode::kUpdatedButNotActive";
case ErrorCode::kNoUpdate:
return "ErrorCode::kNoUpdate";
+ case ErrorCode::kRollbackNotPossible:
+ return "ErrorCode::kRollbackNotPossible";
// Don't add a default case to let the compiler warn about newly added
// error codes which should be added here.
}