[Pkg-libvirt-commits] [libguestfs] 111/233: libvirt domain: Allow network drives with no <host> elements.

Hilko Bengen bengen at moszumanska.debian.org
Wed Feb 19 21:11:25 UTC 2014


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch experimental
in repository libguestfs.

commit 58ada01783ccac13e4ad86b71210d44e7084b8a5
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Thu Jan 23 11:05:01 2014 +0000

    libvirt domain: Allow network drives with no <host> elements.
    
    This is valid for some network drives:
    
    <source protocol='rbd' name='abc-def/ghi-jkl'/>
    
    instead of this:
    
    <source protocol='rbd' name='abc-def/ghi-jkl'>
      <host name='foo' port='1234'/>
    </source>
    
    Allow both forms.
---
 src/libvirt-domain.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index ace2e00..af9770f 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -541,8 +541,7 @@ for_each_disk (guestfs_h *g,
         xphost = xmlXPathEvalExpression (BAD_CAST "./source/host",
                                              xpathCtx);
         if (xphost == NULL ||
-            xphost->nodesetval == NULL ||
-            xphost->nodesetval->nodeNr == 0)
+            xphost->nodesetval == NULL)
           continue;
 
         /* This gives us a list of <host> elements, which each have a

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list