git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Need to declare asprintf_nowarn as inline to avoid gcc complaining.
[libguestfs.git]
/
inspector
/
virt-inspector.pl
diff --git
a/inspector/virt-inspector.pl
b/inspector/virt-inspector.pl
index
5f612e3
..
9148a48
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
@@
-352,8
+357,9
@@
sub output_text_os
print $os->{os}, " " if exists $os->{os};
print $os->{distro}, " " if exists $os->{distro};
print $os->{os}, " " if exists $os->{os};
print $os->{distro}, " " if exists $os->{distro};
- print $os->{version}, " " if exists $os->{version};
- print "(".$os->{distrofamily}." family)", " " if exists $os->{distrofamily};
+ print $os->{major_version} if exists $os->{major_version};
+ print ".", $os->{minor_version} if exists $os->{minor_version};
+ print " ";
print "on ", $os->{root_device}, ":\n";
print __" Mountpoints:\n";
print "on ", $os->{root_device}, ":\n";
print __" Mountpoints:\n";
@@
-444,8
+450,10
@@
sub output_xml_os
foreach ( [ "name" => "os" ],
[ "distro" => "distro" ],
foreach ( [ "name" => "os" ],
[ "distro" => "distro" ],
- [ "distrofamily" => "distrofamily" ],
- [ "version" => "version" ],
+ [ "major_version" => "major_version" ],
+ [ "minor_version" => "minor_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]};
}