Make Copier support starting and ending bytes
This sets us up to be able to fill large power of two buffers in the
logger so they can be very efficiently handed to the OS to be written.
The code to do this will come later.
Change-Id: I65faab96ab9058e268fb773b30a2155bbef8f2f7
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/aos/events/logging/buffer_encoder.cc b/aos/events/logging/buffer_encoder.cc
index ae20440..4b3ccf3 100644
--- a/aos/events/logging/buffer_encoder.cc
+++ b/aos/events/logging/buffer_encoder.cc
@@ -32,8 +32,8 @@
const size_t input_buffer_initial_size = input_buffer_.size();
input_buffer_.resize(input_buffer_initial_size + copy->size());
- const size_t written_size =
- copy->Copy(input_buffer_.data() + input_buffer_initial_size);
+ const size_t written_size = copy->Copy(
+ input_buffer_.data() + input_buffer_initial_size, 0, copy->size());
DCHECK_EQ(written_size, copy->size());
total_bytes_ += written_size;