Re: [Qemu-devel] [PATCH] qemu-io: Return non-zero exit code on failure

2017-01-12 Thread Nir Soffer
On Wed, Jan 11, 2017 at 11:51 PM, Eric Blake wrote: > On 01/11/2017 12:24 PM, Nir Soffer wrote: >> From: Nir Soffer >> >> The result of openfile was not checked, leading to failure deep in the >> actual command with confusing error message, and exiting with

Re: [Qemu-devel] [PATCH] qemu-io: Return non-zero exit code on failure

2017-01-12 Thread Nir Soffer
On Thu, Jan 12, 2017 at 5:01 AM, Fam Zheng wrote: > On Wed, 01/11 15:51, Eric Blake wrote: >> On 01/11/2017 12:24 PM, Nir Soffer wrote: >> > From: Nir Soffer >> > >> > The result of openfile was not checked, leading to failure deep in the >> > actual command

Re: [Qemu-devel] [PATCH] qemu-io: Return non-zero exit code on failure

2017-01-11 Thread Fam Zheng
On Wed, 01/11 15:51, Eric Blake wrote: > On 01/11/2017 12:24 PM, Nir Soffer wrote: > > From: Nir Soffer > > > > 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

Re: [Qemu-devel] [PATCH] qemu-io: Return non-zero exit code on failure

2017-01-11 Thread Eric Blake
On 01/11/2017 12:24 PM, Nir Soffer wrote: > From: Nir Soffer > > 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 one example - trying to read a pattern from an

[Qemu-devel] [PATCH] qemu-io: Return non-zero exit code on failure

2017-01-11 Thread Nir Soffer
From: Nir Soffer 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 one example - trying to read a pattern from an invalid chain: $ qemu-io -c 'read -P 1 0 1024'