Re: [Qemu-devel] [PATCH] qemu-img: Fix content mismatch offset of image compare

2013-11-13 Thread Miroslav Rezanina
- Original Message - From: Fam Zheng f...@redhat.com To: qemu-devel@nongnu.org Cc: stefa...@redhat.com, kw...@redhat.com, Miroslav Rezanina mreza...@redhat.com Sent: Wednesday, November 13, 2013 5:04:18 AM Subject: [PATCH] qemu-img: Fix content mismatch offset of image compare We

[Qemu-devel] [PATCH] qemu-img: Fix content mismatch offset of image compare

2013-11-12 Thread Fam Zheng
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 very weird mismatch offset. This fixes the bug. In the if branch, setting ret to 1 before using it makes dead code in the next line: pnum is never added to mismatch

Re: [Qemu-devel] [PATCH] qemu-img: Fix content mismatch offset of image compare

2013-11-12 Thread Amos Kong
On Wed, Nov 13, 2013 at 12:04:18PM +0800, Fam Zheng wrote: 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 very weird mismatch offset. This fixes the bug. In the if branch, setting ret to 1 before using it