Define AlignedWriter::Write overload that reads into the internal buffer
from an Input and writes it aligned to the output.
Change-Id: I72c1dead8cdcb912bf44fd1e36940cdb741f92df
- Update AlignedWriter to prevent writing after an error occurs.
- Ensure that the number of written bytes is always returned for
AlignedWriter errors.
- Remove FlashError::Mode, since the number of bytes affected should
always be set.
- Add tests to alignment_test.cc and key_value_store.cc to cover
failures during AlignedWrite.
- Update some comments.
Change-Id: Id62f1564b3641be0aeb7f799f0fa0538a1b5b09e
- Disallow implicit conversions between Status and StatusWithSize, which
can be problematic.
- Add TRY_WITH_SIZE to pw_kvs to handle returning StatusWithSize from
functions.
- Make zero the default size argument for StatusWithSize.
- Expand tests for StatusWithSize.
Change-Id: Ia1c36e5a39402a50138d93e89afbaa5e772adb8a
- Define the Output interface.
- Create AlignedWriter class, which handles writing aligned and padded
data to a buffer.
- Define AlignedWriterBuffer, which provides a buffer to an
AlignedWriter.
Change-Id: I791c5fc2d47617b0866fa779a506cb977905f245