Handle retry count
Test: vdc setCheckpoint 2 then reboot 3 times checking state
Bug: 112901762
Change-Id: I85a71d059bca27b76175b9bd8465cc453f0ddb8d
diff --git a/Checkpoint.cpp b/Checkpoint.cpp
index 1833733..8f86174 100644
--- a/Checkpoint.cpp
+++ b/Checkpoint.cpp
@@ -66,7 +66,7 @@
bool cp_startCheckpoint(int retry) {
if (retry < -1) return false;
- std::string content = std::to_string(retry);
+ std::string content = std::to_string(retry + 1);
if (retry == -1) {
sp<IBootControl> module = IBootControl::getService();
if (module) {
@@ -136,7 +136,7 @@
return false;
}
-bool cp_needsCheckpoint(void) {
+bool cp_needsCheckpoint() {
bool ret;
std::string content;
sp<IBootControl> module = IBootControl::getService();
@@ -148,7 +148,7 @@
return false;
}
-bool cp_prepareDriveForCheckpoint(const std::string&) {
+bool cp_prepareCheckpoint() {
auto fstab_default = std::unique_ptr<fstab, decltype(&fs_mgr_free_fstab)>{
fs_mgr_read_fstab_default(), fs_mgr_free_fstab};
if (!fstab_default) return false;