From: Richard W.M. Jones Date: Thu, 14 Apr 2011 16:58:51 +0000 (+0100) Subject: inspector: Include in output. X-Git-Tag: 1.11.1~6 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=36d3a4ce53317b104d48b60c9fe1ed679065d1d4;p=libguestfs.git inspector: Include in output. --- diff --git a/inspector/example-debian.xml b/inspector/example-debian.xml index c699d77..5b60092 100644 --- a/inspector/example-debian.xml +++ b/inspector/example-debian.xml @@ -10,6 +10,7 @@ 0 deb apt + debian.invalid installed / diff --git a/inspector/example-fedora.xml b/inspector/example-fedora.xml index 1444bb7..4c01a20 100644 --- a/inspector/example-fedora.xml +++ b/inspector/example-fedora.xml @@ -10,6 +10,7 @@ 0 rpm yum + fedora.invalid installed / diff --git a/inspector/example-ubuntu.xml b/inspector/example-ubuntu.xml index 6169781..ab08b0c 100644 --- a/inspector/example-ubuntu.xml +++ b/inspector/example-ubuntu.xml @@ -10,6 +10,7 @@ 10 deb apt + ubuntu.invalid installed / diff --git a/inspector/example-windows.xml b/inspector/example-windows.xml index 8b3b8a7..55b11df 100644 --- a/inspector/example-windows.xml +++ b/inspector/example-windows.xml @@ -11,6 +11,7 @@ 1 /Windows ControlSet001 + windows.invalid installed / diff --git a/inspector/virt-inspector.c b/inspector/virt-inspector.c index 69c4ea9..607e5ae 100644 --- a/inspector/virt-inspector.c +++ b/inspector/virt-inspector.c @@ -428,6 +428,14 @@ output_root (xmlTextWriterPtr xo, char *root) free (str); ); + str = guestfs_inspect_get_hostname (g, root); + if (!str) exit (EXIT_FAILURE); + if (STRNEQ (str, "unknown")) + XMLERROR (-1, + xmlTextWriterWriteElement (xo, BAD_CAST "hostname", + BAD_CAST str)); + free (str); + str = guestfs_inspect_get_format (g, root); if (!str) exit (EXIT_FAILURE); if (STRNEQ (str, "unknown")) diff --git a/inspector/virt-inspector.rng b/inspector/virt-inspector.rng index 669e8bc..f59311c 100644 --- a/inspector/virt-inspector.rng +++ b/inspector/virt-inspector.rng @@ -40,6 +40,7 @@ +