[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] qdev: add virtserial char drv init hacks
From: |
Amit Shah |
Subject: |
[Qemu-devel] [PATCH] qdev: add virtserial char drv init hacks |
Date: |
Tue, 9 Jun 2009 22:12:47 +0530 |
Signed-off-by: Amit Shah <address@hidden>
---
hw/qdev.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/hw/qdev.c b/hw/qdev.c
index 689cf4c..661bcde 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -172,9 +172,13 @@ CharDriverState *qdev_init_chardev(DeviceState *dev)
{
static int next_serial;
static int next_virtconsole;
+ static int next_virtserial;
+
/* FIXME: This is a nasty hack that needs to go away. */
- if (strncmp(dev->type->name, "virtio", 6) == 0) {
+ if (strncmp(dev->name, "virtio-console", 14) == 0) {
return virtcon_hds[next_virtconsole++];
+ } else if (strncmp(dev->name, "virtio-serial", 13) == 0) {
+ return virtio_serial_hds[next_virtserial++];
} else {
return serial_hds[next_serial++];
}
--
1.6.0.6
- [Qemu-devel] [RFC] virtio-serial device, Amit Shah, 2009/06/09
- [Qemu-devel] [PATCH] pci: add define for communication class devices, Amit Shah, 2009/06/09
- [Qemu-devel] [PATCH] qdev: add virtserial char drv init hacks,
Amit Shah <=
- Re: [Qemu-devel] [PATCH] virtio-serial: PCI device for simple host <-> guest communication, Richard W.M. Jones, 2009/06/09
- Re: [Qemu-devel] [PATCH] virtio-serial: PCI device for simple host <-> guest communication, Stuart Brady, 2009/06/09
- Re: [Qemu-devel] [PATCH] virtio-serial: PCI device for simple host <-> guest communication, Anthony Liguori, 2009/06/09
- Re: [Qemu-devel] [PATCH] virtio-serial: PCI device for simple host <-> guest communication, Paul Brook, 2009/06/09
- Re: [Qemu-devel] [PATCH] virtio-serial: PCI device for simple host <-> guest communication, Amit Shah, 2009/06/10
- Re: [Qemu-devel] [PATCH] virtio-serial: PCI device for simple host <-> guest communication, Jamie Lokier, 2009/06/10