qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC,PATCH 08/11] qdev: Add usb_bus_dev_info


From: Markus Armbruster
Subject: Re: [Qemu-devel] [RFC,PATCH 08/11] qdev: Add usb_bus_dev_info
Date: Mon, 18 Jan 2010 13:44:40 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Gerd Hoffmann <address@hidden> writes:

> On 01/18/10 11:15, Markus Armbruster wrote:
>> Nathan Baum<address@hidden>  writes:
>>
>>>>> +static QObject *usb_bus_dev_info(Monitor *mon, DeviceState *qdev)
>>>>> +{
>>>>> +    USBDevice *dev = DO_UPCAST(USBDevice, qdev, qdev);
>>>>> +    USBBus *bus = usb_bus_from_device(dev);
>>>>> +    return qobject_from_jsonf("{'busnr': %d, 'addr':%d, 'speed': %s, 
>>>>> 'desc': %s, 'attached': %i}",
>>>>> +                              bus->busnr,
>>>>
>>>> As for PCI, 'busnr' belongs to the bus, not the device.
>
> You want be able to figure which bus the device is attached to.
>
> I think you actually can because the command returns the device tree
> converted into a qobject tree, correct?

Correct.

[...]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]