AU: SplitWriter class for parsing our full update files.
Full updates now include data for two partitions (kernel + rootfs).
This CL adds a new SplitFileWriter class which takes the stream of
data, which is expected to be in our full update format (8 bytes big
endian uint64_t of the first partition size, followed by first
partition data, followed by second partition size). It parses the
size, then writes the data to each of two FileWriter classes.
BUG=None
TEST=Attached unittest
Review URL: http://codereview.chromium.org/1800009
diff --git a/delta_performer.cc b/delta_performer.cc
index 79aea61..765fc1e 100644
--- a/delta_performer.cc
+++ b/delta_performer.cc
@@ -110,7 +110,7 @@
// -errno on error.
// This function performs as many actions as it can, given the amount of
// data received thus far.
-int DeltaPerformer::Write(const void* bytes, size_t count) {
+ssize_t DeltaPerformer::Write(const void* bytes, size_t count) {
const char* c_bytes = reinterpret_cast<const char*>(bytes);
buffer_.insert(buffer_.end(), c_bytes, c_bytes + count);