On 01/31/2017 07:57 AM, Nir Soffer wrote:
> From: Nir Soffer <nsof...@redhat.com>
> 
> The result of openfile was not checked, leading to failure deep in the
> actual command with confusing error message, and exiting with exit code 0.
> 
> Here is a simple example - trying to read with the wrong format:
> 
>     $ touch file
>     $ qemu-io -f qcow2 -c 'read -P 1 0 1024' file; echo $?
>     can't open device file: Image is not in qcow2 format
>     no file open, try 'help open'
>     0
> 
> With this patch, we fail earlier with exit code 1:
> 
>     $ ./qemu-io -f qcow2 -c 'read -P 1 0 1024' file; echo $?
>     can't open device file: Image is not in qcow2 format
>     1
> 
> Failing earlier, we don't log this error now:
> 
>     no file open, try 'help open'
> 
> But some tests expected it; the line was removed from the test output.
> 
> Signed-off-by: Nir Soffer <nir...@gmail.com>
> ---

Yay - v4 is a lot nicer! Thanks for putting up with our advice on making
your submission better.

Reviewed-by: Eric Blake <ebl...@redhat.com>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to