git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
virt-inspector --fish: Fix incorrect '-a' parameter (RHBZ#512709)
[libguestfs.git]
/
inspector
/
virt-inspector.pl
diff --git
a/inspector/virt-inspector.pl
b/inspector/virt-inspector.pl
index
3754ced
..
09edbae
100755
(executable)
--- 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 $rw = 0;
$rw = 1 if $output eq "fish";
my $g;
+my @images;
if ($uri) {
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 {
} else {
- $g = open_guest (\@ARGV, rw => $rw);
+ my ($conn, $dom);
+ ($g, $conn, $dom, @images) =
+ open_guest (\@ARGV, rw => $rw);
}
$g->launch ();
}
$g->launch ();
@@
-302,7
+307,7
@@
if ($output eq "fish" || $output eq "ro-fish") {
print "--ro ";
}
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
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" ],
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]};
}
[ "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) {
{
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";
}
}
print "rhel=$rhel\n";
}