On Mon, 18 Jan 2010 18:14:32 +0100
Markus Armbruster <arm...@redhat.com> wrote:

> Luiz Capitulino <lcapitul...@redhat.com> writes:
> 
> > This commit adds the "pci_bridge" key to the PCI device QDict,
> > it also adds support for printing it in the user protocol.
> >
> > IMPORTANT: This code is being added separately because I could
> > NOT test it properly. According to Michael Tsirkin, it depends
> > on ultrasparc and it would take time to do the proper setup.
> >
> > Signed-off-by: Luiz Capitulino <lcapitul...@redhat.com>
> > ---
> >  hw/pci.c |   76 
> > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
> >  1 files changed, 73 insertions(+), 3 deletions(-)
> >
> > diff --git a/hw/pci.c b/hw/pci.c
> > index 8275ceb..d5e4866 100644
> > --- a/hw/pci.c
> > +++ b/hw/pci.c
> > @@ -1102,6 +1102,7 @@ void pci_for_each_device(PCIBus *bus, int bus_num,
> >  
> >  static void pci_device_print(Monitor *mon, QDict *device)
> >  {
> > +    int class;
> >      QDict *qdict;
> >      QListEntry *entry;
> >      uint64_t addr, size;
> > @@ -1113,10 +1114,11 @@ static void pci_device_print(Monitor *mon, QDict 
> > *device)
> >      monitor_printf(mon, "    ");
> >  
> >      qdict = qdict_get_qdict(device, "class_info");
> > +    class = qdict_get_int(qdict, "class");
> >      if (qdict_haskey(qdict, "desc")) {
> >          monitor_printf(mon, "%s", qdict_get_str(qdict, "desc"));
> >      } else {
> > -        monitor_printf(mon, "Class %04" PRId64, qdict_get_int(qdict, 
> > "class"));
> > +        monitor_printf(mon, "Class %d", class);
> >      }
> >  
> >      qdict = qdict_get_qdict(device, "id");
> 
> This change seems unrelated.  Is it intentional?

 I guess it's not, I'll revert and re-submit.


Reply via email to