Handle resume of VABC updates by emitting labels
To support resuming an update with Virtual AB Compression, we emit
labels in between operations. Before writing any data to CowWriter, we
emit label 0. After writing all SOURCE_COPY, we emit label 1. Each time
we finished writing an InstallOp, we emit a label incremented by 1. When
resuming, we pass the label to CowWriter.
Test: treehugger
Change-Id: I126efc406286a30a6090a9ce14c65a7d273aee56
diff --git a/common/constants.cc b/common/constants.cc
index 8883668..1648596 100644
--- a/common/constants.cc
+++ b/common/constants.cc
@@ -98,6 +98,8 @@
const char kPrefsUpdateStateNextDataLength[] = "update-state-next-data-length";
const char kPrefsUpdateStateNextDataOffset[] = "update-state-next-data-offset";
const char kPrefsUpdateStateNextOperation[] = "update-state-next-operation";
+const char kPrefsUpdateStatePartitionNextOperation[] =
+ "update-state-partition-next-operation";
const char kPrefsUpdateStatePayloadIndex[] = "update-state-payload-index";
const char kPrefsUpdateStateSHA256Context[] = "update-state-sha-256-context";
const char kPrefsUpdateStateSignatureBlob[] = "update-state-signature-blob";