Add checkpointing support for A/B updates

This adds implicit rollback support during A/B style updates.
If you explicitly start a checkpoint with -1, needsRollback will
trigger if the update fails, and should be used if any additional
cleanup is needed that is not covered by A/B itself.

Test: All Checkpoint tests pass
Bug: 111020314
Change-Id: I88b4a1098c6bac4dc1438a54c8a8f59577a6c17b
diff --git a/vdc.cpp b/vdc.cpp
index a080c17..5e2c37a 100644
--- a/vdc.cpp
+++ b/vdc.cpp
@@ -115,6 +115,10 @@
         bool enabled = false;
         checkStatus(vold->needsCheckpoint(&enabled));
         return enabled ? 1 : 0;
+    } else if (args[0] == "checkpoint" && args[1] == "needsRollback" && args.size() == 2) {
+        bool enabled = false;
+        checkStatus(vold->needsRollback(&enabled));
+        return enabled ? 1 : 0;
     } else if (args[0] == "checkpoint" && args[1] == "commitChanges" && args.size() == 2) {
         bool success = false;
         checkStatus(vold->commitChanges(&success));