Number here is specific to the device type (and otherwise opaque) unfortunately per this IOCtl: https://docs.microsoft.com/en-us/windows/desktop/api/winioctl/ni-winioctl-ioctl_storage_get_device_number Should I put a comment in qapi-schema.json pointing to this?
From: Eric Blake Sent: Monday, January 14, 2019 11:41 To: mhi...@scalecomputing.com; qemu-devel@nongnu.org Cc: Michael Roth Subject: Re: [Qemu-devel] [PATCH] QGA: Fix guest-get-fsinfo PCI addresscollection in Windows On 1/14/19 3:03 AM, mhi...@scalecomputing.com wrote: > From: Matt Hines <mhi...@scalecomputing.com> > > Signed-off-by: Matt Hines <mhi...@scalecomputing.com> The title says what (a fix), but no description of that fix or a "why" in the commit body. > --- > configure | 2 +- > qga/commands-win32.c | 295 > +++++++++++++++++++++++++++++++++------------------ > qga/qapi-schema.json | 3 +- > 3 files changed, 197 insertions(+), 103 deletions(-) > +++ b/qga/qapi-schema.json > @@ -836,6 +836,7 @@ > # @unit: unit id > # @serial: serial number (since: 3.1) > # @dev: device node (POSIX) or device UNC (Windows) (since: 3.1) > +# @number: device slot index (Windows) Adding a member is more than just a fix. Also, this is missing a '(since 4.0)' tag. > # > # Since: 2.2 > ## > @@ -843,7 +844,7 @@ > 'data': {'pci-controller': 'GuestPCIAddress', > 'bus-type': 'GuestDiskBusType', > 'bus': 'int', 'target': 'int', 'unit': 'int', > - '*serial': 'str', '*dev': 'str'} } > + '*serial': 'str', '*dev': 'str', 'number':'int'} } > > ## > # @GuestFilesystemInfo: > -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org