[Libguestfs] [PATCH] guestfish -iv should print the virt-inspector command

Richard W.M. Jones rjones at redhat.com
Fri Jul 24 14:47:55 UTC 2009


This patch makes guestfish -iv print the actual virt-inspector
command, which is pretty useful for debugging.

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 75 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
-------------- next part --------------
>From 3082681cc661011c8745936cc8c05e6fa84e0b98 Mon Sep 17 00:00:00 2001
From: Richard W.M. Jones <rjones at redhat.com>
Date: Fri, 24 Jul 2009 15:46:15 +0100
Subject: [PATCH] guestfish -iv should print virt-inspector command (for debugging).

---
 fish/fish.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/fish/fish.c b/fish/fish.c
index f5d538d..fdb2ba2 100644
--- a/fish/fish.c
+++ b/fish/fish.c
@@ -340,7 +340,9 @@ main (int argc, char *argv[])
     if (!guestfs_get_autosync (g))
       strcat (cmd, " -n");
 
-    /*printf ("%s\n", cmd);*/
+    if (verbose)
+      fprintf (stderr,
+	       "guestfish -i: running virt-inspector command:\n%s\n", cmd);
 
     r = system (cmd);
     if (r == -1) {
-- 
1.6.2.5



More information about the Libguestfs mailing list