qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] virtio-serial: Unplug port if guest reports failure in adding it
@ 2010-08-31  8:22 Amit Shah
  2010-09-01 10:00 ` [Qemu-devel] " Amit Shah
  0 siblings, 1 reply; 2+ messages in thread
From: Amit Shah @ 2010-08-31  8:22 UTC (permalink / raw)
  To: qemu list; +Cc: Amit Shah, Juan Quintela

If a guest reports failure in adding a port, we shouldn't keep it lying
around.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
---
 hw/virtio-serial-bus.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c
index 74ba5ec..86c2364 100644
--- a/hw/virtio-serial-bus.c
+++ b/hw/virtio-serial-bus.c
@@ -303,6 +303,7 @@ static void handle_control_message(VirtIOSerial *vser, void *buf, size_t len)
         if (!cpkt.value) {
             error_report("virtio-serial-bus: Guest failure in adding port %u for device %s\n",
                          port->id, vser->bus->qbus.name);
+            qdev_unplug(&port->dev);
             break;
         }
         /*
-- 
1.7.2.2

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

end of thread, other threads:[~2010-09-01 10:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-31  8:22 [Qemu-devel] [PATCH] virtio-serial: Unplug port if guest reports failure in adding it Amit Shah
2010-09-01 10:00 ` [Qemu-devel] " Amit Shah

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).