mrc0mmand / rpms / libguestfs

Forked from rpms/libguestfs 3 years ago
Clone

Blame SOURCES/0211-v2v-When-debugging-dump-OVF-to-stderr.patch

ffd6ed
From eefc781b0accad81f1a9064210f8cc6cf913a3de Mon Sep 17 00:00:00 2001
ffd6ed
From: "Richard W.M. Jones" <rjones@redhat.com>
ffd6ed
Date: Thu, 23 Apr 2015 10:52:08 +0100
ffd6ed
Subject: [PATCH] v2v: When debugging, dump OVF to stderr.
ffd6ed
ffd6ed
Useful for debugging problems like RHBZ#1213701.
ffd6ed
ffd6ed
(cherry picked from commit 4f021006e9e85b0cc284d8c1cd3dcee416d75d51)
ffd6ed
---
ffd6ed
 v2v/OVF.ml | 5 +++++
ffd6ed
 1 file changed, 5 insertions(+)
ffd6ed
ffd6ed
diff --git a/v2v/OVF.ml b/v2v/OVF.ml
ffd6ed
index 2f0c469..b8a9a38 100644
ffd6ed
--- a/v2v/OVF.ml
ffd6ed
+++ b/v2v/OVF.ml
ffd6ed
@@ -332,6 +332,11 @@ let rec create_ovf verbose source targets guestcaps inspect
ffd6ed
     warning ~prog (f_"This guest required a password for connection to its display, but this is not supported by RHEV.  Therefore the converted guest's display will not require a separate password to connect.");
ffd6ed
     | _ -> ());
ffd6ed
 
ffd6ed
+  if verbose then (
ffd6ed
+    eprintf "OVF:\n";
ffd6ed
+    doc_to_chan Pervasives.stderr ovf
ffd6ed
+  );
ffd6ed
+
ffd6ed
   (* Return the OVF document. *)
ffd6ed
   ovf
ffd6ed
 
ffd6ed
-- 
ffd6ed
1.8.3.1
ffd6ed