diff options
Diffstat (limited to 'update_engine_client_android.cc')
| -rw-r--r-- | update_engine_client_android.cc | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/update_engine_client_android.cc b/update_engine_client_android.cc index 7766f793..7d9bc3de 100644 --- a/update_engine_client_android.cc +++ b/update_engine_client_android.cc @@ -144,7 +144,10 @@ int UpdateEngineClientAndroid::OnInit() { false, "Follow status update changes until a final state is reached. " "Exit status is 0 if the update succeeded, and 1 otherwise."); - + DEFINE_bool(merge, + false, + "Wait for previous update to merge. " + "Only available after rebooting to new slot."); // Boilerplate init commands. base::CommandLine::Init(argc_, argv_); brillo::FlagHelper::Init(argc_, argv_, "Android Update Engine Client"); @@ -222,6 +225,16 @@ int UpdateEngineClientAndroid::OnInit() { return ExitWhenIdle(status); } + if (FLAGS_merge) { + int32_t ret = 0; + Status status = service_->cleanupSuccessfulUpdate(&ret); + if (status.isOk()) { + LOG(INFO) << "CleanupSuccessfulUpdate exits with " + << utils::ErrorCodeToString(static_cast<ErrorCode>(ret)); + } + return ExitWhenIdle(status); + } + if (FLAGS_follow) { // Register a callback object with the service. callback_ = new UECallback(this); |
