mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +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);
|
||||
}
|
||||
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user