[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] Remove a detached device from qemu_device_opts.
From: |
Ken'ichi Ohmichi |
Subject: |
[Qemu-devel] [PATCH] Remove a detached device from qemu_device_opts. |
Date: |
Thu, 27 Jan 2011 18:00:57 +0900 |
Hi,
When I tried to attach the interface after detaching the same interface,
the virsh command output the following and it failed:
# virsh detach-interface Domain01 network --mac 52:54:00:0d:78:92
Interface detached successfully
# virsh attach-interface Domain01 network default --mac 52:54:00:0d:78:92
error: Failed to attach interface
error: internal error unable to execute QEMU command 'device_add': Duplicate
ID 'net0' for device
#
The reason is that a detached device is not removed from the list
"qemu_device_opts", and this patch fixes it.
Thanks
Ken'ichi Ohmichi
Signed-off-by: Ken'ichi Ohmichi <address@hidden>
---
--- a/hw/qdev.c 2011-01-27 17:42:25.000000000 +0900
+++ b/hw/qdev.c 2011-01-27 17:43:46.000000000 +0900
@@ -905,6 +905,8 @@ int do_device_del(Monitor *mon, const QD
qerror_report(QERR_DEVICE_NOT_FOUND, id);
return -1;
}
+ qemu_opts_del(qemu_opts_find(&qemu_device_opts, id));
+
return qdev_unplug(dev);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [PATCH] Remove a detached device from qemu_device_opts.,
Ken'ichi Ohmichi <=