]> git.ipfire.org Git - thirdparty/libvirt.git/commit
parallels: fix usage of disk->info.addr.drive structure
authorDmitry Guryanov <dguryanov@parallels.com>
Mon, 15 Dec 2014 12:47:25 +0000 (15:47 +0300)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 15 Dec 2014 16:20:45 +0000 (17:20 +0100)
commitdec21593e1bb1dd8bffe551eb5012538b0997d72
tree66ea161e80c2dcf471bbc6a08aa2f85fc9574890
parent87be10858fed1311be435be82e30aecccf1d12a9
parallels: fix usage of disk->info.addr.drive structure

For SCSI and SATA devices controller and unit are used
to specify drive address. For IDE devices - bus specifies
IDE bus, becase usually there are 2 IDE buses on IDE
controller.

Parallels SDK allows to set drive position by calling
PrlVmDev_SetStackIndex. Since PCS VMs have only one
controller of each type, for SATA and SCSI devices it
simple means position on bus, for IDE devices -
2 * bus_number + position_on_bus.

This patch fixes mapping from libvirt's disk->info.addr.drive
to parallels's 'StackIndex'.

Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com>
src/parallels/parallels_sdk.c