[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [PATCH] v2v: -i libvirtxml: ignore <listen type='none'> (RHBZ#1378022)



When reading a libvirt XML which has:

  <graphics ...>
    <listen type='none'/>
  </graphics>

then just ignore it, as it is (roughly) the same as no <listen> child
elements at all.  This avoids a warning about an unknown listen type.
---
 v2v/input_libvirtxml.ml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/v2v/input_libvirtxml.ml b/v2v/input_libvirtxml.ml
index 33e878e..1540798 100644
--- a/v2v/input_libvirtxml.ml
+++ b/v2v/input_libvirtxml.ml
@@ -101,6 +101,7 @@ let parse_libvirt_xml ?conn xml =
           (* Use only the first <listen> configuration. *)
           match xpath_string "listen[1]/@type" with
           | None -> LNone
+          | Some "none" -> LNone
           | Some "address" ->
             (match xpath_string "listen[1]/@address" with
             | None -> LNone
-- 
2.7.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]