Merge "Clear the warm_reset flag after boot is successful"
am: 3fc3d75eb0
Change-Id: I7da336fa51761f133c633a9ba9997c99772b1e9c
diff --git a/Checkpoint.cpp b/Checkpoint.cpp
index b2b648f..88f7cad 100644
--- a/Checkpoint.cpp
+++ b/Checkpoint.cpp
@@ -170,6 +170,10 @@
if (!cr.success)
return error(EINVAL, "Error marking booted successfully: " + std::string(cr.errMsg));
LOG(INFO) << "Marked slot as booted successfully.";
+ // Clears the warm reset flag for next reboot.
+ if (!SetProperty("ota.warm_reset", "0")) {
+ LOG(WARNING) << "Failed to reset the warm reset flag";
+ }
}
// Must take action for list of mounted checkpointed things here
// To do this, we walk the list of mounted file systems.