diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-09-04 11:53:57 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-09-04 11:56:20 +0100 |
commit | 6fdf1f40fa85d2e6e7a1118f4cfa532ea9831b89 (patch) | |
tree | 7d8fc4c9991c691502ec5cf123689474328d7e93 /rescue | |
parent | 77f70a5f7cd908609833a948031544c0befbc874 (diff) | |
download | libguestfs-6fdf1f40fa85d2e6e7a1118f4cfa532ea9831b89.tar.gz libguestfs-6fdf1f40fa85d2e6e7a1118f4cfa532ea9831b89.tar.xz libguestfs-6fdf1f40fa85d2e6e7a1118f4cfa532ea9831b89.zip |
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.
Diffstat (limited to 'rescue')
-rw-r--r-- | rescue/virt-rescue.c | 3 |
1 files changed, 2 insertions, 1 deletions
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. |