]> Git Repo - qemu.git/commit - qemu-img.c
qemu-img: Drop redundant error message in compare
authorEric Blake <[email protected]>
Thu, 12 Oct 2017 03:47:12 +0000 (22:47 -0500)
committerKevin Wolf <[email protected]>
Thu, 26 Oct 2017 12:45:57 +0000 (14:45 +0200)
commit0608e40e8e1934b22a3d218cf04abc4eb108c493
tree07b8410d5de8746585b03811ea5222ea16c53223
parentdebb38a4cec34709604a00e23368e6cd8932fe3d
qemu-img: Drop redundant error message in compare

If a read error is encountered during 'qemu-img compare', we
were printing the "Error while reading offset ..." message twice;
this was because our helper function was awkward, printing output
on some but not all paths.  Fix it to consistently report errors
on all paths, so that the callers do not risk a redundant message,
and update the testsuite for the improved output.

Further simplify the code by hoisting the conversion from an error
message to an exit code into the helper function, rather than
repeating that logic at all callers (yes, the helper function is
now less generic, but it's a net win in lines of code).

Signed-off-by: Eric Blake <[email protected]>
Reviewed-by: John Snow <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
qemu-img.c
tests/qemu-iotests/074.out
This page took 0.026527 seconds and 4 git commands to generate.