[Pkg-libvirt-commits] [libguestfs] 32/59: v2v: convert old-style libvirt listen configuration (RHBZ#1174073)

Hilko Bengen bengen at moszumanska.debian.org
Sun May 3 21:26:35 UTC 2015


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

bengen pushed a commit to branch experimental
in repository libguestfs.

commit 8c26ef91f95a9de68cea4c2341e00c938586f950
Author: Pino Toscano <ptoscano at redhat.com>
Date:   Mon Apr 27 10:16:40 2015 +0200

    v2v: convert old-style libvirt listen configuration (RHBZ#1174073)
    
    Use the listen configuration from the "listen" attribute of <graphics>,
    in case <listen> is missing.
    
    Followup of commit 9360675dc244a8762e07a8a4289e7a30ca3e1eef.
---
 v2v/input_libvirtxml.ml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/v2v/input_libvirtxml.ml b/v2v/input_libvirtxml.ml
index 8400779..dd46ee2 100644
--- a/v2v/input_libvirtxml.ml
+++ b/v2v/input_libvirtxml.ml
@@ -98,8 +98,9 @@ let parse_libvirt_xml ?conn ~verbose xml =
       let listen =
         let obj = Xml.xpath_eval_expression xpathctx "listen" in
         let nr_nodes = Xml.xpathobj_nr_nodes obj in
-        if nr_nodes < 1 then LNone
-        else (
+        if nr_nodes < 1 then (
+          match xpath_to_string "@listen" "" with "" -> LNone | a -> LAddress a
+        ) else (
           (* Use only the first <listen> configuration. *)
           match xpath_to_string "listen[1]/@type" "" with
           | "" -> LNone

-- 
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