On 11/13/2013 05:43 AM, Kevin Wolf wrote: > From: Fam Zheng <f...@redhat.com> > > This patch moves ret assignment after reporting original error. > > We were lucky to pass qemu-iotests 048 (qemu-img compare case) but when > I tried to run with TEST_DIR=/tmp (tmpfs), it fails with a "wrong" > mismatch offset. This fixes two bugs. > > In the first if branch, setting ret to 1 before using it makes dead code > in the next line: pnum is never added to mismatch offset even if ret was > 0. > > In the other if branch, currently the output error is always -4: > strerror(-4) -> Unknown error -4 > > Added regression test in case 048. > > Signed-off-by: Fam Zheng <f...@redhat.com> > Signed-off-by: Amos Kong <ak...@redhat.com> > Signed-off-by: Kevin Wolf <kw...@redhat.com> > --- > > There was another case of overwritten ret that I added in v3.
Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature