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.
This commit is contained in:
Richard W.M. Jones
2012-09-04 11:53:57 +01:00
parent 77f70a5f7c
commit 6fdf1f40fa

View File

@@ -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.