Merge "Fail startCheckpoint if checkpoints not supported" am: 6c704f736c am: 7c35004b27
am: 1fc2d57bbd

Change-Id: I3ab32e4f3290e52f1ad27054a957b0632567f4bd
diff --git a/Checkpoint.cpp b/Checkpoint.cpp
index 8715bfa..0605c72 100644
--- a/Checkpoint.cpp
+++ b/Checkpoint.cpp
@@ -125,6 +125,10 @@
 }
 
 Status cp_startCheckpoint(int retry) {
+    bool result;
+    if (!cp_supportsCheckpoint(result).isOk() || !result)
+        return error(ENOTSUP, "Checkpoints not supported");
+
     if (retry < -1) return error(EINVAL, "Retry count must be more than -1");
     std::string content = std::to_string(retry + 1);
     if (retry == -1) {