parallels: report, that cdroms are readonly

Set readonly flag for cdrom devices when we
retrieve a list of domains from PCS.

Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com>
This commit is contained in:
Dmitry Guryanov 2015-04-07 23:35:03 +03:00 committed by Michal Privoznik
parent 8951ad86ce
commit 66aee37530

View File

@ -478,10 +478,12 @@ prlsdkGetDiskInfo(PRL_HANDLE prldisk,
virDomainDiskSetFormat(disk, VIR_STORAGE_FILE_RAW);
}
if (isCdrom)
if (isCdrom) {
disk->device = VIR_DOMAIN_DISK_DEVICE_CDROM;
else
disk->src->readonly = true;
} else {
disk->device = VIR_DOMAIN_DISK_DEVICE_DISK;
}
pret = PrlVmDev_GetFriendlyName(prldisk, NULL, &buflen);
prlsdkCheckRetGoto(pret, cleanup);