X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=inspector%2Fvirt-inspector.pl;h=09edbae1bf2f14985fa959e2d398f9899d9b2c08;hp=3754ceda1299cef25497d4f6e39287f6083126f3;hb=7a14e0509d5cc976deda9b5299f56930e0317502;hpb=b3595c5553035798b7b33d05c9326f7e8dd55e69 diff --git a/inspector/virt-inspector.pl b/inspector/virt-inspector.pl index 3754ced..09edbae 100755 --- a/inspector/virt-inspector.pl +++ b/inspector/virt-inspector.pl @@ -207,10 +207,15 @@ pod2usage (__"virt-inspector: no image or VM names given") if @ARGV == 0; my $rw = 0; $rw = 1 if $output eq "fish"; my $g; +my @images; if ($uri) { - $g = open_guest (\@ARGV, rw => $rw, address => $uri); + my ($conn, $dom); + ($g, $conn, $dom, @images) = + open_guest (\@ARGV, rw => $rw, address => $uri); } else { - $g = open_guest (\@ARGV, rw => $rw); + my ($conn, $dom); + ($g, $conn, $dom, @images) = + open_guest (\@ARGV, rw => $rw); } $g->launch (); @@ -302,7 +307,7 @@ if ($output eq "fish" || $output eq "ro-fish") { print "--ro "; } - print "-a $_ " foreach @ARGV; + print "-a $_ " foreach @images; my $mounts = $oses->{$root_dev}->{mounts}; # Have to mount / first. Luckily '/' is early in the ASCII @@ -444,6 +449,8 @@ sub output_xml_os foreach ( [ "name" => "os" ], [ "distro" => "distro" ], [ "version" => "version" ], + [ "package_format" => "package_format" ], + [ "package_management" => "package_management" ], [ "root" => "root_device" ] ) { $xml->dataElement($_->[0], $os->{$_->[1]}) if exists $os->{$_->[1]}; } @@ -623,7 +630,8 @@ sub output_query_rhel { my $rhel = "no"; foreach my $os (keys %$oses) { - $rhel="yes" if $oses->{$os}->{os} eq "linux" && $oses->{$os}->{distro} eq "redhat"; + $rhel="yes" if ($oses->{$os}->{os} eq "linux" && + $oses->{$os}->{distro} eq "rhel"); } print "rhel=$rhel\n"; }