[PATCH 1/5] vz: report "scsi" bus for disks when nothing was set explixitly

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

 



This is necessary for to show CTs created out of libvirt correctly.

Signed-off-by: Maxim Nestratov <mnestratov@xxxxxxxxxxxxx>
---
 src/vz/vz_sdk.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c
index d5688e1..9976e4c 100644
--- a/src/vz/vz_sdk.c
+++ b/src/vz/vz_sdk.c
@@ -562,18 +562,15 @@ prlsdkGetDiskId(PRL_HANDLE disk, int *bus, char **dst)
         *bus = VIR_DOMAIN_DISK_BUS_IDE;
         *dst = virIndexToDiskName(pos, "hd");
         break;
-    case PMS_SCSI_DEVICE:
-        *bus = VIR_DOMAIN_DISK_BUS_SCSI;
-        *dst = virIndexToDiskName(pos, "sd");
-        break;
     case PMS_SATA_DEVICE:
         *bus = VIR_DOMAIN_DISK_BUS_SATA;
         *dst = virIndexToDiskName(pos, "sd");
         break;
+    case PMS_SCSI_DEVICE:
     default:
-        virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Unknown disk bus: %X"), ifType);
-        return -1;
+        *bus = VIR_DOMAIN_DISK_BUS_SCSI;
+        *dst = virIndexToDiskName(pos, "sd");
+        break;
     }
 
     if (NULL == *dst)
-- 
2.4.11

--
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]
  Powered by Linux