Merge "Fail startCheckpoint if checkpoints not supported"

am: 6c704f736c

Change-Id: I631c9828782452ab763d108d85082cd2120c5ee7
This commit is contained in:
Paul Lawrence 2019-06-14 17:11:00 -07:00 committed by android-build-merger
commit 7c35004b27

View file

@ -125,6 +125,10 @@ Status cp_supportsFileCheckpoint(bool& result) {
}
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) {