Add a feature to get the last UpdateAttempt ErrorCode from update_engine
For autotest, update_engine test failures are always hard to debug,
since the error message is not clear. Add a new flag 'last_attempt_error'
to get the last UpdateAttempt ErrorCode from update_engine.
Bug:25598547
Test:emerge-peppy update_engine
emerge-peppy update_engine_client
cros flash a test image to DUT.
(on the DUT):update_engine_client --last_attempt_error
Compare the results with the update_engine logs, matched.
Change-Id: Id12681097ed30b0826cad68809f17f934a07e5b2
diff --git a/binder_service_brillo.cc b/binder_service_brillo.cc
index 45ac343..6a6a16e 100644
--- a/binder_service_brillo.cc
+++ b/binder_service_brillo.cc
@@ -186,6 +186,12 @@
return Status::ok();
}
+Status BinderUpdateEngineBrilloService::GetLastAttemptError(
+ int* out_last_attempt_error) {
+ return CallCommonHandler(&UpdateEngineService::GetLastAttemptError,
+ out_last_attempt_error);
+}
+
void BinderUpdateEngineBrilloService::UnregisterStatusCallback(
IUpdateEngineStatusCallback* callback) {
auto it = callbacks_.begin();