Re: [Qemu-devel] [PATCH 04/11] qdev: pcibus_dev_info

2009-12-31 Thread Luiz Capitulino
On Sat, 26 Dec 2009 21:19:15 + Nathan Baum wrote: > This returns a QObject detailing the PCI-specific data about the device. Back to this again, turns out I'm converting pci_info() and I think we should agree on some standards for PCI keys. > +static QObject *pcibus_dev_info(Monitor *mon,

Re: [Qemu-devel] [PATCH 04/11] qdev: pcibus_dev_info

2009-12-29 Thread Nathan Baum
On Tue, 2009-12-29 at 15:08 -0200, Luiz Capitulino wrote: > > +class = pci_get_word(d->config + PCI_CLASS_DEVICE); > > +desc = pci_class_descriptions; > > +while (desc->desc && class != desc->class) > > +desc++; > > +if (desc->desc) { > > +qdict_put(qobject_to_qdict

Re: [Qemu-devel] [PATCH 04/11] qdev: pcibus_dev_info

2009-12-29 Thread Luiz Capitulino
On Sat, 26 Dec 2009 21:19:15 + Nathan Baum wrote: > +static QObject *pcibus_dev_info(Monitor *mon, DeviceState *dev) > +{ > +PCIDevice *d = (PCIDevice *)dev; > +const pci_class_desc *desc; > +PCIIORegion *r; > +int i, class; > +QObject *retval; > +QList *regions; > +

[Qemu-devel] [PATCH 04/11] qdev: pcibus_dev_info

2009-12-26 Thread Nathan Baum
This returns a QObject detailing the PCI-specific data about the device. Signed-off-by: Nathan Baum --- hw/pci.c | 48 1 files changed, 48 insertions(+), 0 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 9722fce..8688d8a 100644 --- a/hw/pci