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

Bjoern Walk bwalk at linux.vnet.ibm.com
Mon Mar 21 11:55:53 UTC 2016


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'"),
-- 
2.6.5




More information about the libvir-list mailing list