diff options
author | Daniel Verkamp <dverkamp@chromium.org> | 2019-09-18 11:22:07 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-09-25 00:06:27 +0000 |
commit | 71a6f0a790eb3f9a6fccbaf08aa915396a9d6749 (patch) | |
tree | e9e9c632f671860534afc1efa932acd41f006d05 /src/linux.rs | |
parent | b2d4e11579b23e84ef62290600337084a64770c4 (diff) | |
download | crosvm-71a6f0a790eb3f9a6fccbaf08aa915396a9d6749.tar crosvm-71a6f0a790eb3f9a6fccbaf08aa915396a9d6749.tar.gz crosvm-71a6f0a790eb3f9a6fccbaf08aa915396a9d6749.tar.bz2 crosvm-71a6f0a790eb3f9a6fccbaf08aa915396a9d6749.tar.lz crosvm-71a6f0a790eb3f9a6fccbaf08aa915396a9d6749.tar.xz crosvm-71a6f0a790eb3f9a6fccbaf08aa915396a9d6749.tar.zst crosvm-71a6f0a790eb3f9a6fccbaf08aa915396a9d6749.zip |
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>
Diffstat (limited to 'src/linux.rs')
0 files changed, 0 insertions, 0 deletions