[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 22/27] not-for-upstream: virtio-serial: stub out a s
From: |
Anthony Liguori |
Subject: |
[Qemu-devel] [PATCH 22/27] not-for-upstream: virtio-serial: stub out a strange hack |
Date: |
Tue, 20 Dec 2011 10:51:51 -0600 |
You shouldn't override class methods in an object initialization function.
Whatever the code is trying to achieve here, it needs to be rethought and done
in a better way.
Amit, if you can give me some insight into what's going on here, I can take a
look at refactoring.
Cc: Amit Shah <address@hidden>
---
hw/virtio-console.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/hw/virtio-console.c b/hw/virtio-console.c
index f922400..6c32e7f 100644
--- a/hw/virtio-console.c
+++ b/hw/virtio-console.c
@@ -109,9 +109,13 @@ static int virtconsole_initfn(VirtIOSerialPort *port)
if (vcon->chr) {
qemu_chr_add_handlers(vcon->chr, chr_can_read, chr_read, chr_event,
vcon);
- info->have_data = flush_buf;
- info->guest_open = guest_open;
- info->guest_close = guest_close;
+ /* FIXME: This is not right */
+ abort();
+ if (0) {
+ info->have_data = flush_buf;
+ info->guest_open = guest_open;
+ info->guest_close = guest_close;
+ }
}
return 0;
--
1.7.4.1
- [Qemu-devel] [PATCH 26/27] pci: convert to QEMU Object Model, (continued)
- [Qemu-devel] [PATCH 26/27] pci: convert to QEMU Object Model, Anthony Liguori, 2011/12/20
- Re: [Qemu-devel] [PATCH 00/27] qom: add QEMU Object Model type hierarchy to qdev, Anthony Liguori, 2011/12/20
- [Qemu-devel] [PATCH 23/27] virtio-serial: convert to QEMU Object Model, Anthony Liguori, 2011/12/20
- [Qemu-devel] [PATCH 21/27] spapr: convert to QEMU Object Model, Anthony Liguori, 2011/12/20
- [Qemu-devel] [PATCH 18/27] ide: convert to QEMU Object Model, Anthony Liguori, 2011/12/20
- [Qemu-devel] [PATCH 25/27] unin_pci: remove phantom qdev devices in unin_pci, Anthony Liguori, 2011/12/20
- [Qemu-devel] [PATCH 24/27] grackle: remove broken pci device, Anthony Liguori, 2011/12/20
- [Qemu-devel] [PATCH 20/27] not-for-upstream: spapr: break default console, Anthony Liguori, 2011/12/20
- [Qemu-devel] [PATCH 16/27] i2c: smbus: convert to QEMU Object Model, Anthony Liguori, 2011/12/20
- [Qemu-devel] [PATCH 27/27] sysbus: convert to QEMU Object Model, Anthony Liguori, 2011/12/20
- [Qemu-devel] [PATCH 22/27] not-for-upstream: virtio-serial: stub out a strange hack,
Anthony Liguori <=