[PATCH 4/6] parallels: report, that cdroms are readonly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When retriving list of domains from PCS, set
readonly flag for cdrom devices.

Signed-off-by: Dmitry Guryanov <dguryanov@xxxxxxxxxxxxx>
---
 src/parallels/parallels_sdk.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/parallels/parallels_sdk.c b/src/parallels/parallels_sdk.c
index 6b3321b..ea090b7 100644
--- a/src/parallels/parallels_sdk.c
+++ b/src/parallels/parallels_sdk.c
@@ -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);
-- 
2.1.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]