[Libguestfs] [PATCH 06/14] v2v: Print \n after warnings.

Richard W.M. Jones rjones at redhat.com
Mon Jun 23 11:32:22 UTC 2014


Using eprintf so this is not implicit (unlike 'error' function).
---
 v2v/convert_linux_enterprise.ml | 6 +++---
 v2v/convert_linux_grub.ml       | 2 +-
 v2v/source_libvirt.ml           | 5 +++--
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/v2v/convert_linux_enterprise.ml b/v2v/convert_linux_enterprise.ml
index 4313fa3..64eb93d 100644
--- a/v2v/convert_linux_enterprise.ml
+++ b/v2v/convert_linux_enterprise.ml
@@ -197,7 +197,7 @@ Grub1/grub-legacy error was: %s")
           Convert_linux_common.augeas_reload verbose g
         with
           G.Error msg ->
-            eprintf (f_"%s: warning: VirtualBox Guest Additions were detected, but uninstallation failed.  The error message was: %s (ignored)")
+            eprintf (f_"%s: warning: VirtualBox Guest Additions were detected, but uninstallation failed.  The error message was: %s (ignored)\n%!")
               prog msg
     )
 
@@ -282,7 +282,7 @@ Grub1/grub-legacy error was: %s")
         Convert_linux_common.augeas_reload verbose g
       with
         G.Error msg ->
-          eprintf (f_"%s: warning: VMware tools was detected, but uninstallation failed.  The error message was: %s (ignored)")
+          eprintf (f_"%s: warning: VMware tools was detected, but uninstallation failed.  The error message was: %s (ignored)\n%!")
             prog msg
     )
 
@@ -372,7 +372,7 @@ Grub1/grub-legacy error was: %s")
       upgrade_package "kernel" (0_l, "2.6.25.5", "1.1")
 
     | _ ->
-      eprintf (f_"%s: warning: don't know how to install virtio drivers for %s %d")
+      eprintf (f_"%s: warning: don't know how to install virtio drivers for %s %d\n%!")
         prog distro major_version;
       false
 
diff --git a/v2v/convert_linux_grub.ml b/v2v/convert_linux_grub.ml
index 59dd4f2..1f4d1ae 100644
--- a/v2v/convert_linux_grub.ml
+++ b/v2v/convert_linux_grub.ml
@@ -272,7 +272,7 @@ object (self)
        ignore (g#command [| "grub2-mkconfig"; "-o"; config_file |])
      with
        G.Error msg ->
-         eprintf (f_"%s: warning: could not update grub2 console: %s (ignored)\n")
+         eprintf (f_"%s: warning: could not update grub2 console: %s (ignored)\n%!")
            prog msg
     )
 
diff --git a/v2v/source_libvirt.ml b/v2v/source_libvirt.ml
index 245e0d2..520b1e3 100644
--- a/v2v/source_libvirt.ml
+++ b/v2v/source_libvirt.ml
@@ -128,11 +128,12 @@ let create_xml ?dir xml =
           )
         | "" -> ()
         | protocol ->
-          eprintf (f_"%s: warning: network <disk> with <source protocol='%s'> was ignored")
+          eprintf (f_"%s: warning: network <disk> with <source protocol='%s'> was ignored\n%!")
             prog protocol
         )
       | disk_type ->
-        eprintf (f_"%s: warning: <disk type='%s'> was ignored") prog disk_type
+        eprintf (f_"%s: warning: <disk type='%s'> was ignored\n%!")
+          prog disk_type
     done;
     List.rev !disks in
 
-- 
1.9.0




More information about the Libguestfs mailing list