diff options
author | Richard Jones <rjones@trick.home.annexia.org> | 2009-07-09 14:35:34 +0100 |
---|---|---|
committer | Richard Jones <rjones@trick.home.annexia.org> | 2009-07-09 15:33:33 +0100 |
commit | 7058e5c63ecc8ed41c9fcc011fbe215bad6f6369 (patch) | |
tree | 2ce6eebe8b279e79c06851af6d0a0b35222805b6 /inspector | |
parent | 2f70ca487bee8babe5aef27f00a2131ea86ebd50 (diff) | |
download | libguestfs-7058e5c63ecc8ed41c9fcc011fbe215bad6f6369.tar.gz libguestfs-7058e5c63ecc8ed41c9fcc011fbe215bad6f6369.tar.xz libguestfs-7058e5c63ecc8ed41c9fcc011fbe215bad6f6369.zip |
Move 'get_partitions' call into Sys::Guestfs::Lib.
Diffstat (limited to 'inspector')
-rwxr-xr-x | inspector/virt-inspector.pl | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/inspector/virt-inspector.pl b/inspector/virt-inspector.pl index 2922ecc4..5b225b27 100755 --- a/inspector/virt-inspector.pl +++ b/inspector/virt-inspector.pl @@ -20,7 +20,7 @@ use warnings; use strict; use Sys::Guestfs; -use Sys::Guestfs::Lib qw(open_guest); +use Sys::Guestfs::Lib qw(open_guest get_partitions); use Pod::Usage; use Getopt::Long; use Data::Dumper; @@ -212,21 +212,6 @@ if ($uri) { $g->launch (); $g->wait_ready (); -# We want to get the list of LVs and partitions (ie. anything that -# could contain a filesystem). Discard any partitions which are PVs. -my @partitions = $g->list_partitions (); -my @pvs = $g->pvs (); -sub is_pv { - my $t = shift; - foreach (@pvs) { - return 1 if $_ eq $t; - } - 0; -} -@partitions = grep { ! is_pv ($_) } @partitions; - -my @lvs = $g->lvs (); - =head1 OUTPUT FORMAT Operating system(s) @@ -270,7 +255,7 @@ right place. For example: =cut # List of possible filesystems. -my @devices = sort (@lvs, @partitions); +my @devices = get_partitions ($g); # Now query each one to build up a picture of what's in it. my %fses = map { $_ => check_fs ($_) } @devices; |