diff options
author | Daniel Verkamp <dverkamp@chromium.org> | 2019-04-19 14:01:12 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-04-22 12:28:08 -0700 |
commit | e9c4383764c5657f3389c68c8039d39e5a519d54 (patch) | |
tree | 47c31ca1910882af9052515442c98555702fdf13 /devices/src/virtio/block.rs | |
parent | 67d124ac53e4ba4d5f64f6b368de00e90afe4f8e (diff) | |
download | crosvm-e9c4383764c5657f3389c68c8039d39e5a519d54.tar crosvm-e9c4383764c5657f3389c68c8039d39e5a519d54.tar.gz crosvm-e9c4383764c5657f3389c68c8039d39e5a519d54.tar.bz2 crosvm-e9c4383764c5657f3389c68c8039d39e5a519d54.tar.lz crosvm-e9c4383764c5657f3389c68c8039d39e5a519d54.tar.xz crosvm-e9c4383764c5657f3389c68c8039d39e5a519d54.tar.zst crosvm-e9c4383764c5657f3389c68c8039d39e5a519d54.zip |
devices: block: clarify read/write error messages
Fix up the Display impl for ExecuteError so that it's clear which direction data is moving for the Read and Write variants. BUG=None TEST=cargo build Change-Id: Ide4ea5cb453e4d7f6bd2812a1696df96daec511b Signed-off-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1574963 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Zach Reizner <zachr@chromium.org>
Diffstat (limited to 'devices/src/virtio/block.rs')
-rw-r--r-- | devices/src/virtio/block.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/devices/src/virtio/block.rs b/devices/src/virtio/block.rs index e5b6c33..ef9b145 100644 --- a/devices/src/virtio/block.rs +++ b/devices/src/virtio/block.rs @@ -258,8 +258,8 @@ impl Display for ExecuteError { guestmemerr, } => write!( f, - "failed to read {} bytes from address {} sector {}: {}", - length, addr, sector, guestmemerr, + "failed to read {} bytes from sector {} to address {}: {}", + length, sector, addr, guestmemerr, ), Seek { ioerr, sector } => write!(f, "failed to seek to sector {}: {}", sector, ioerr), TimerFd(e) => write!(f, "{}", e), @@ -270,7 +270,7 @@ impl Display for ExecuteError { guestmemerr, } => write!( f, - "failed to write {} bytes to address {} sector {}: {}", + "failed to write {} bytes from address {} to sector {}: {}", length, addr, sector, guestmemerr, ), DiscardWriteZeroes { |