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-18 23:49:26 +0100 |
commit | 3c95a5e2e1b2f2e30a9e4c16dcc9dceefe1d9ec2 (patch) | |
tree | 66a24cb2ebc11deb6da048bc1bb67e11c219bab7 | |
parent | 7dfd9593e8246edace750a83a72d0c24c068be1e (diff) | |
download | libguestfs-3c95a5e2e1b2f2e30a9e4c16dcc9dceefe1d9ec2.tar.gz libguestfs-3c95a5e2e1b2f2e30a9e4c16dcc9dceefe1d9ec2.tar.xz libguestfs-3c95a5e2e1b2f2e30a9e4c16dcc9dceefe1d9ec2.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.
(cherry picked from commit 6fdf1f40fa85d2e6e7a1118f4cfa532ea9831b89)
-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. |