On 04/12/2012 15:49, Peter Maydell wrote:
On 4 December 2012 14:35,  <fred.kon...@greensocs.com> wrote:
From: KONRAD Frederic <fred.kon...@greensocs.com>

Create the virtio-pci device. This transport device will create a
virtio-pci-bus, so one VirtIODevice can be connected.

Signed-off-by: KONRAD Frederic <fred.kon...@greensocs.com>
---
  hw/virtio-pci.c | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  hw/virtio-pci.h |  14 +++++++
  2 files changed, 126 insertions(+)

diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
index 5ac8d0d..8426122 100644
--- a/hw/virtio-pci.c
+++ b/hw/virtio-pci.c
@@ -1119,6 +1119,115 @@ static TypeInfo virtio_scsi_info = {
      .class_init    = virtio_scsi_class_init,
  };

+/*
+ * virtio-pci : This is the PCIDevice which have a virtio-pci-bus.
+ */
+
+/* init callback */
+static void virtio_pci_init_cb(void *opaque)
+/* exit callback */
+static void virtio_pci_exit_cb(void *opaque)
+static int virtio_pci_init(PCIDevice *pci_dev)
+static void virtio_pci_exit(PCIDevice *pci_dev)
It's rather confusing to have an init and an init_cb and also
an exit and an exit_cb, and not to have anything explaining
what the difference is or when each one is called or what
needs to be done in one that can't be done in the other.
Right, I'll change the name and add comments.

-- PMM



Reply via email to