OSDN Git Service

qga: added bus type and disk location path
authorOlga Krishtal <okrishtal@virtuozzo.com>
Tue, 30 Jun 2015 10:25:22 +0000 (13:25 +0300)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 8 Jul 2015 01:59:04 +0000 (20:59 -0500)
commita3ef3b2272d8349c932f8c440bcaa31d8518b1c0
treee68a9d0641c6959debab233917818aae17fd9133
parent50cbebb9a339f43cda2005785010361497151882
qga: added bus type and disk location path

According to Microsoft disk location path can be obtained via
IOCTL_SCSI_GET_ADDRESS. Unfortunately this ioctl can not be used for all
devices. There are certain bus types which could be obtained with this
API. Please, refer to the following link for more details
https://technet.microsoft.com/en-us/library/ee851589(v=ws.10).aspx

Bus type could be obtained using IOCTL_STORAGE_QUERY_PROPERTY. Enum
STORAGE_BUS_TYPE describes all buses supported by OS.

Windows defines more bus types than Linux. Thus some values have been added
to GuestDiskBusType.

Signed-off-by: Olga Krishtal <okrishtal@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Eric Blake <eblake@redhat.com>
CC: Michael Roth <mdroth@linux.vnet.ibm.com>
* fixed warning in CreateFile due to use of NULL instead of 0
* only provide disk info when CONFIG_QGA_NTDDSCSI=y
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
qga/commands-win32.c
qga/qapi-schema.json