X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=inspector%2Fvirt-inspector;h=071f0b0815c4066fabbe93b32292342e242b0e2c;hp=dc8847f91bc096e744fccdaaa52bdab9a1453571;hb=de64183f3d0d04127c2e7690c87435e6649d30a6;hpb=5021b2efea92c021c04812056149485ac4803e9c diff --git a/inspector/virt-inspector b/inspector/virt-inspector index dc8847f..071f0b0 100755 --- a/inspector/virt-inspector +++ b/inspector/virt-inspector @@ -247,10 +247,9 @@ Windows), the distribution and version. The diagram above shows what we return for each OS. With the I<--xml> option the output is mapped into an XML document. -Unfortunately there is no clear schema for this document -(contributions welcome) but you can get an idea of the format by -looking at other documents and as a last resort the source for this -program. +There is a RELAX-NG schema for this XML in the file +I which normally ships with virt-inspector, or can +be found in the source. With the I<--fish> or I<--ro-fish> option the mount points are mapped to L command line parameters, so that you can go in @@ -551,23 +550,23 @@ sub output_xml_os } if ($os->{kernels}) { - $xml->startTag("kernels"); - my @kernels = @{$os->{kernels}}; - foreach (@kernels) { - $xml->startTag("kernel", - "version" => $_->{version}, - "arch" => $_->{arch}); - $xml->startTag("modules"); - my @modules = @{$_->{modules}}; - foreach (@modules) { - $xml->dataElement("module", $_); - } - $xml->endTag("modules"); - $xml->dataElement("path", $_->{path}) if(defined($_->{path})); - $xml->dataElement("package", $_->{package}) if(defined($_->{package})); - $xml->endTag("kernel"); - } - $xml->endTag("kernels"); + $xml->startTag("kernels"); + my @kernels = @{$os->{kernels}}; + foreach (@kernels) { + $xml->startTag("kernel", + "version" => $_->{version}, + "arch" => $_->{arch}); + $xml->startTag("modules"); + my @modules = @{$_->{modules}}; + foreach (@modules) { + $xml->dataElement("module", $_); + } + $xml->endTag("modules"); + $xml->dataElement("path", $_->{path}) if(defined($_->{path})); + $xml->dataElement("package", $_->{package}) if(defined($_->{package})); + $xml->endTag("kernel"); + } + $xml->endTag("kernels"); } if (exists $os->{root}->{registry}) {