|
From: | Kewei Yu |
Subject: | Re: [Qemu-discuss] 回复: how use qemu device_add and drive_add |
Date: | Wed, 16 Jul 2014 14:17:24 +0800 |
thanks for your reply.in my use, device_del usb_disk11 than drive_del usb_disk1,resulted assert too.in the end, I Commented out hw/qdev.c line 439 .if (bus->parent) {QLIST_INSERT_HEAD(&bus->parent->child_bus, bus, sibling);bus->parent->num_child_bus++;// object_property_add_child(OBJECT(bus->parent), bus->name, OBJECT(bus), NULL);}but I don't know the consequences.------------------ 原始邮件 ------------------发件人: "Dale R. Worley";<address@hidden>;发送时间: 2014年7月3日(星期四) 晚上11:23收件人: "liang"<address@hidden>;抄送: "qemu-discuss"<address@hidden>;主题: Re: [Qemu-discuss] how use qemu device_add and drive_add> From: "liang" <address@hidden>
> add device use:
> 1 drive_add 0 file=hotplug.raw,if=none,id=usb_disk1
> 2 device_add usb-storage,drive=usb_disk1,id=usb_disk11,removable=on
>
> and del device use:
> 3 drive_del usb_disk1
> 4 device_del usb_disk11
>
> but when command 4 the qemu allways "assertion failed: (obj->ref ==
> 0)" receive SIGABRT.
I expect that you must perform commands 3 and 4 in the reverse order:
device_del usb_disk11
drive_del usb_disk1
because the existence of usb_disk11 requires the existence of
usb_disk1.
I expect that if you attempt to delete usb_disk1 while usb_disk11
exists, then either (a) both usb_disk1 and usb_disk11 are deleted, or
(b) the attempt to delete usb_disk1 fails because usb_disk1 is "in
use".
But I am a novice with Qemu.
Dale
.
[Prev in Thread] | Current Thread | [Next in Thread] |