]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
phyp: Prohibit fc_host adapter for phyp driver
authorOsier Yang <jyang@redhat.com>
Mon, 25 Mar 2013 16:43:39 +0000 (00:43 +0800)
committerOsier Yang <jyang@redhat.com>
Mon, 8 Apr 2013 10:41:06 +0000 (18:41 +0800)
It's possible to support fc_host adapter for phyp driver too, but
at this stage I'd like to not allow it when I'm not that clear
how it works.

src/phyp/phyp_driver.c

index a47ed65f0aaa592173aa84715e0d4f61b52a342c..50e8216805d7eee9cd235a0d39c19d5ddb7bafa3 100644 (file)
@@ -2506,6 +2506,13 @@ phypBuildStoragePool(virConnectPtr conn, virStoragePoolDefPtr def)
     int exit_status = 0;
     virBuffer buf = VIR_BUFFER_INITIALIZER;
 
+    if (source.adapter.type !=
+        VIR_STORAGE_POOL_SOURCE_ADAPTER_TYPE_SCSI_HOST) {
+        virReportError(VIR_ERR_XML_ERROR, "%s",
+                       _("Only 'scsi_host' adapter is supported"));
+        goto cleanup;
+    }
+
     if (system_type == HMC)
         virBufferAsprintf(&buf, "viosvrcmd -m %s --id %d -c '",
                           managed_system, vios_id);