diff mbox

[2/2] qemu-io: fix segment fault when the image format is qed

Message ID 1329661499-13001-1-git-send-email-zwu.kernel@gmail.com
State New
Headers show

Commit Message

Zhiyong Wu Feb. 19, 2012, 2:24 p.m. UTC
From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>

[root@f15 qemu]# qemu-io -c info /home/zwu/work/misc/rh6.img 
format name: qed
cluster size: 64 KiB
vm state offset: 0.000000 bytes
Segmentation fault (core dumped)

This reason is same as the former patch

Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
---
 qemu-io.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Comments

Christoph Hellwig Feb. 19, 2012, 9:24 p.m. UTC | #1
On Sun, Feb 19, 2012 at 10:24:59PM +0800, zwu.kernel@gmail.com wrote:
> From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
> 
> [root@f15 qemu]# qemu-io -c info /home/zwu/work/misc/rh6.img 
> format name: qed
> cluster size: 64 KiB
> vm state offset: 0.000000 bytes
> Segmentation fault (core dumped)
> 
> This reason is same as the former patch

Please add this as a testcase to qemu-iotests.
Zhiyong Wu Feb. 20, 2012, 6:22 a.m. UTC | #2
On Mon, Feb 20, 2012 at 5:24 AM, Christoph Hellwig <hch@lst.de> wrote:
> On Sun, Feb 19, 2012 at 10:24:59PM +0800, zwu.kernel@gmail.com wrote:
>> From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
>>
>> [root@f15 qemu]# qemu-io -c info /home/zwu/work/misc/rh6.img
>> format name: qed
>> cluster size: 64 KiB
>> vm state offset: 0.000000 bytes
>> Segmentation fault (core dumped)
>>
>> This reason is same as the former patch
>
> Please add this as a testcase to qemu-iotests.
Sorry, i am not familar with qemu-iotests. Is it necessary?
>
diff mbox

Patch

diff --git a/qemu-io.c b/qemu-io.c
index 0249be4..3189530 100644
--- a/qemu-io.c
+++ b/qemu-io.c
@@ -1856,6 +1856,8 @@  int main(int argc, char **argv)
 
     bdrv_init();
 
+    qemu_init_main_loop();
+
     /* initialize commands */
     quit_init();
     help_init();