]> xenbits.xensource.com Git - libvirt.git/commitdiff
virsh: Fix printing of XML for pool-create-as
authorJohn Ferlan <jferlan@redhat.com>
Thu, 28 May 2015 18:29:19 +0000 (14:29 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Mon, 1 Jun 2015 09:40:45 +0000 (05:40 -0400)
https://bugzilla.redhat.com/show_bug.cgi?id=1224088

commit id 'bd00e00e' neglected to add the new adapter source options
into the if condition that allowed printing the <source> XML fields.
The <adapter type='fc_host'.../> doesn't require other options in order
to be complete.

tools/virsh-pool.c

index 4865831c9570052085144566fa39e133cba49578..b420fe20a28b75add1755342f361c0706276e662 100644 (file)
@@ -284,7 +284,8 @@ vshBuildPoolXML(vshControl *ctl,
     virBufferAsprintf(&buf, "<pool type='%s'>\n", type);
     virBufferAdjustIndent(&buf, 2);
     virBufferAsprintf(&buf, "<name>%s</name>\n", name);
-    if (srcHost || srcPath || srcDev || srcFormat || srcName) {
+    if (srcHost || srcPath || srcDev || srcFormat || srcName ||
+        (adapterWwnn && adapterWwpn) || adapterName) {
         virBufferAddLit(&buf, "<source>\n");
         virBufferAdjustIndent(&buf, 2);