[libvirt] [PATCH] virsh: Fix printing of XML for pool-create-as

Ján Tomko jtomko at redhat.com
Fri May 29 07:39:12 UTC 2015


On Thu, May 28, 2015 at 08:51:37PM -0400, John Ferlan wrote:
> 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.
> 
> Signed-off-by: John Ferlan <jferlan at redhat.com>
> ---
>  tools/virsh-pool.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 

ACK

Jan

> diff --git a/tools/virsh-pool.c b/tools/virsh-pool.c
> index 4865831..b420fe2 100644
> --- a/tools/virsh-pool.c
> +++ b/tools/virsh-pool.c
> @@ -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);
>  
> -- 
> 2.1.0
> 
> --
> libvir-list mailing list
> libvir-list at redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150529/c3a905d1/attachment-0001.sig>


More information about the libvir-list mailing list