crosvm/qcow/src
Daniel Verkamp 71a6f0a790 sys_util: add write_zeroes_all() function
In the same spirit as write_all() for the standard io::Write::write()
function, add a write_zeroes_all() function with a default
implementation that calls write_zeroes() in a loop until the requested
length is met.  This will allow write_zeroes implementations that don't
necessarily fulfill the entire requested length.

BUG=None
TEST=cargo test -p sys_util write_zeroes

Change-Id: I0fc3a4b3fe8904946e253ab8a2687555b12657be
Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1811466
Reviewed-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Cody Schuffelen <schuffelen@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2019-09-25 00:06:27 +00:00
..
qcow.rs sys_util: add write_zeroes_all() function 2019-09-25 00:06:27 +00:00
qcow_raw_file.rs sys_util: add write_zeroes_all() function 2019-09-25 00:06:27 +00:00
refcount.rs edition: Update absolute paths to 2018 style 2019-03-13 21:05:03 -07:00
vec_cache.rs toolchain: Update to Rust 1.31.0 2018-12-13 19:28:04 -08:00