mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 07:17:44 +00:00
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:
parent
8951ad86ce
commit
66aee37530
@ -478,10 +478,12 @@ prlsdkGetDiskInfo(PRL_HANDLE prldisk,
|
|||||||
virDomainDiskSetFormat(disk, VIR_STORAGE_FILE_RAW);
|
virDomainDiskSetFormat(disk, VIR_STORAGE_FILE_RAW);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isCdrom)
|
if (isCdrom) {
|
||||||
disk->device = VIR_DOMAIN_DISK_DEVICE_CDROM;
|
disk->device = VIR_DOMAIN_DISK_DEVICE_CDROM;
|
||||||
else
|
disk->src->readonly = true;
|
||||||
|
} else {
|
||||||
disk->device = VIR_DOMAIN_DISK_DEVICE_DISK;
|
disk->device = VIR_DOMAIN_DISK_DEVICE_DISK;
|
||||||
|
}
|
||||||
|
|
||||||
pret = PrlVmDev_GetFriendlyName(prldisk, NULL, &buflen);
|
pret = PrlVmDev_GetFriendlyName(prldisk, NULL, &buflen);
|
||||||
prlsdkCheckRetGoto(pret, cleanup);
|
prlsdkCheckRetGoto(pret, cleanup);
|
||||||
|
Loading…
Reference in New Issue
Block a user