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>
This commit is contained in:
Daniel Verkamp 2019-04-19 14:01:12 -07:00 committed by chrome-bot
parent 67d124ac53
commit e9c4383764

View file

@ -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 {