[libvirt] [PATCH 4/4] libxl: Drop cdrom media update support in live disk attch APIs

Han Han posted 4 patches 1 year, 9 months ago

[libvirt] [PATCH 4/4] libxl: Drop cdrom media update support in live disk attch APIs

Posted by Han Han 1 year, 9 months ago
Signed-off-by: Han Han <hhan@redhat.com>
---
 src/libxl/libxl_driver.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index f021ec9c5d..b481e950da 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -3030,8 +3030,10 @@ libxlDomainAttachDeviceDiskLive(virDomainObjPtr vm, virDomainDeviceDefPtr dev)
 
     switch (l_disk->device)  {
         case VIR_DOMAIN_DISK_DEVICE_CDROM:
-            ret = libxlDomainChangeEjectableMedia(vm, l_disk);
-            break;
+            virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
+                           "%s", _("cdrom update is not supported in this API. "
+                           "Use virDomainUpdateDeviceFlags instead."));
+            goto cleanup;
         case VIR_DOMAIN_DISK_DEVICE_DISK:
             if (l_disk->bus == VIR_DOMAIN_DISK_BUS_XEN) {
                 if (virDomainDiskIndexByName(vm->def, l_disk->dst, true) >= 0) {
-- 
2.24.0.rc1

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