[Libguestfs] [PATCH 1/2] virt-df: Turn errors into warnings when listing all domains.

Richard W.M. Jones rjones at redhat.com
Tue Nov 17 14:24:56 UTC 2009


-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top
-------------- next part --------------
>From 9004f3c5302fbb70212ccc420b863c9a3ca75abf Mon Sep 17 00:00:00 2001
From: Richard Jones <rjones at redhat.com>
Date: Tue, 17 Nov 2009 14:09:58 +0000
Subject: [PATCH 1/2] virt-df: Turn errors into warnings when listing all domains.

This is a partial fix for RHBZ#538041.  When listing all domains,
don't die just because one domain fails, but keep trying for the
rest.
---
 tools/virt-df |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/tools/virt-df b/tools/virt-df
index 78eb25c..6157e21 100755
--- a/tools/virt-df
+++ b/tools/virt-df
@@ -165,7 +165,8 @@ if (@ARGV == 0) {
     if (@domnames) {
         print_title ();
         foreach (@domnames) {
-            do_df ($_);
+            eval { do_df ($_); };
+            warn $@ if $@;
         }
     }
 } else {
-- 
1.6.5.2



More information about the Libguestfs mailing list