parallels: report SATA bus type for container block devices disks

As we can add disks based on block devices to containers and bus type
doesn't have any meaning here, let us report always SATA for them.

Signed-off-by: Maxim Nestratov <mnestratov@parallels.com>
This commit is contained in:
Maxim Nestratov 2015-06-04 00:10:00 +03:00 committed by Dmitry Guryanov
parent 0b7b76cc45
commit 3fd2dd5484

View File

@ -500,8 +500,13 @@ prlsdkGetDiskInfo(PRL_HANDLE prldisk,
if (virDomainDiskSetSource(disk, buf) < 0)
goto cleanup;
pret = PrlVmDev_GetIfaceType(prldisk, &ifType);
prlsdkCheckRetGoto(pret, cleanup);
/* Let physical devices added to CT look like SATA disks */
if (isCt)
ifType = PMS_SATA_DEVICE;
else {
pret = PrlVmDev_GetIfaceType(prldisk, &ifType);
prlsdkCheckRetGoto(pret, cleanup);
}
pret = PrlVmDev_GetStackIndex(prldisk, &pos);
prlsdkCheckRetGoto(pret, cleanup);