[libvirt] [PATCH 3/5] nodedev: parse <path>

marcandre.lureau@redhat.com posted 5 patches 8 years, 12 months ago
[libvirt] [PATCH 3/5] nodedev: parse <path>
Posted by marcandre.lureau@redhat.com 8 years, 12 months ago
From: Marc-André Lureau <marcandre.lureau@redhat.com>

This should have been added with c4a4603de (or 0bdefd9b04).

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 src/conf/node_device_conf.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c
index 49ecc8897..0d1dafcd6 100644
--- a/src/conf/node_device_conf.c
+++ b/src/conf/node_device_conf.c
@@ -1736,6 +1736,8 @@ virNodeDeviceDefParseXML(xmlXPathContextPtr ctxt,
             goto error;
     }
 
+    def->sysfs_path = virXPathString("string(./path[1])", ctxt);
+
     /* Parse devnodes */
     nodes = NULL;
     if ((n = virXPathNodeSet("./devnode", ctxt, &nodes)) < 0)
-- 
2.11.0.295.gd7dffce1c.dirty

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 3/5] nodedev: parse <path>
Posted by Daniel P. Berrange 8 years, 11 months ago
On Wed, Feb 15, 2017 at 01:04:11AM +0400, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> This should have been added with c4a4603de (or 0bdefd9b04).

Technically the node dev parser only needs to parse enough to deal
with NPIV device creation - everything else is output only. But
it is good practice to full parse everything regardless IMHO.

> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  src/conf/node_device_conf.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c
> index 49ecc8897..0d1dafcd6 100644
> --- a/src/conf/node_device_conf.c
> +++ b/src/conf/node_device_conf.c
> @@ -1736,6 +1736,8 @@ virNodeDeviceDefParseXML(xmlXPathContextPtr ctxt,
>              goto error;
>      }
>  
> +    def->sysfs_path = virXPathString("string(./path[1])", ctxt);
> +
>      /* Parse devnodes */
>      nodes = NULL;
>      if ((n = virXPathNodeSet("./devnode", ctxt, &nodes)) < 0)

ACK

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list