diff options
author | Richard Jones <rjones@redhat.com> | 2009-11-17 14:21:54 +0000 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2009-11-17 14:21:54 +0000 |
commit | dda10cd9357169d5c55d9d49e270a6202971b8c0 (patch) | |
tree | 469f6d38cbe001c70615a852566f957d3af60c00 | |
parent | 9004f3c5302fbb70212ccc420b863c9a3ca75abf (diff) | |
download | libguestfs-dda10cd9357169d5c55d9d49e270a6202971b8c0.tar.gz libguestfs-dda10cd9357169d5c55d9d49e270a6202971b8c0.tar.xz libguestfs-dda10cd9357169d5c55d9d49e270a6202971b8c0.zip |
virt-df: Ignore domains which have ID 0.
This is the remainder of the fix for RHBZ#538041. Domains
which have ID 0 are special domains. libvirt defines it as
the "control plane OS". Only Xen and HyperV have this
behaviour, and in both cases we should ignore those domains
for the purposes of virt-df (user can just run "df" if they
need that information for the dom0).
-rwxr-xr-x | tools/virt-df | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/virt-df b/tools/virt-df index 6157e21c..81e17cda 100755 --- a/tools/virt-df +++ b/tools/virt-df @@ -160,6 +160,9 @@ if (@ARGV == 0) { my @doms = $conn->list_defined_domains (); push @doms, $conn->list_domains (); + # https://bugzilla.redhat.com/show_bug.cgi?id=538041 + @doms = grep { $_->get_id () != 0 } @doms; + my @domnames = map { $_->get_name () } @doms; if (@domnames) { |