qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Remove a detached device from qemu_device_opts.
@ 2011-01-27  9:00 Ken'ichi Ohmichi
  2011-02-07 14:40 ` William Dauchy
  2011-02-14  6:19 ` Wen Congyang
  0 siblings, 2 replies; 8+ messages in thread
From: Ken'ichi Ohmichi @ 2011-01-27  9:00 UTC (permalink / raw)
  To: qemu-devel


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 <oomichi@mxs.nes.nec.co.jp>
---
--- 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);
 }
 

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-02-25  9:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-27  9:00 [Qemu-devel] [PATCH] Remove a detached device from qemu_device_opts Ken'ichi Ohmichi
2011-02-07 14:40 ` William Dauchy
2011-02-12 21:28   ` William Dauchy
2011-02-14  6:19 ` Wen Congyang
2011-02-15  2:32   ` Minoru Usui
2011-02-23  9:42     ` William Dauchy
2011-02-25  4:52       ` Minoru Usui
2011-02-25  9:40         ` Markus Armbruster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).