crosvm/qcow
Daniel Verkamp 83e13683e4 qcow: do not modify current_offset in read_cb/write_cb
Rather than using self.current_offset in the internal read_cb and
write_cb helper functions, make them take the starting offset as a
parameter, and move the current_offset update to the callers.

This will allow the read_cb and write_cb functions to be used in
implementing the FileReadWriteAtVolatile trait.

BUG=None
TEST=cargo test -p qcow

Change-Id: Ifa60f6fea27050d0a88f2c00e77e62d4e36b809f
Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1845945
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
2019-10-29 22:06:20 +00:00
..
src qcow: do not modify current_offset in read_cb/write_cb 2019-10-29 22:06:20 +00:00
Cargo.toml qcow: replace byteorder with {to,from}_be_bytes() 2019-08-26 23:41:50 +00:00