[libvirt] [PATCH] conf: node_device: fix wrong XML element reference

Cole Robinson crobinso at redhat.com
Mon Mar 21 12:56:55 UTC 2016


On 03/21/2016 07:55 AM, Bjoern Walk wrote:
> When reading in a XML definition for a SCSI target device, the name
> property of struct scsi_target refers to the @target element.
> 
> Let's fix this obvious typo.
> 
> Signed-off-by: Bjoern Walk <bwalk at linux.vnet.ibm.com>
> Reviewed-by: Boris Fiuczynski <fiuczy at linux.vnet.ibm.com>
> ---
>  src/conf/node_device_conf.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c
> index 611045c..f74b34d 100644
> --- a/src/conf/node_device_conf.c
> +++ b/src/conf/node_device_conf.c
> @@ -822,7 +822,7 @@ virNodeDevCapSCSITargetParseXML(xmlXPathContextPtr ctxt,
>      orignode = ctxt->node;
>      ctxt->node = node;
>  
> -    data->scsi_target.name = virXPathString("string(./name[1])", ctxt);
> +    data->scsi_target.name = virXPathString("string(./target[1])", ctxt);
>      if (!data->scsi_target.name) {
>          virReportError(VIR_ERR_INTERNAL_ERROR,
>                         _("no target name supplied for '%s'"),
> 

Can you also extend tests/nodedevxml2xmltest.c to cover this?

Thanks,
Cole




More information about the libvir-list mailing list