From 6fdf1f40fa85d2e6e7a1118f4cfa532ea9831b89 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 4 Sep 2012 11:53:57 +0100 Subject: rescue: If -v / debugging enabled, don't mask error messages. We set the error handler to NULL in order to mask "normal" error messages that we expect to see because of the unusual way that virt-rescue runs the appliance. However if the user selected -v / enabled debugging, then it is reasonable to expect they want to see every message, so do not mask anything. --- rescue/virt-rescue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rescue/virt-rescue.c b/rescue/virt-rescue.c index f1f8d85c..6bfa6085 100644 --- a/rescue/virt-rescue.c +++ b/rescue/virt-rescue.c @@ -339,7 +339,8 @@ main (int argc, char *argv[]) /* Run the appliance. This won't return until the user quits the * appliance. */ - guestfs_set_error_handler (g, NULL, NULL); + if (!verbose) + guestfs_set_error_handler (g, NULL, NULL); /* We expect launch to fail, so ignore the return value, and don't * bother with explicit guestfs_shutdown either. -- cgit