X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=inspector%2Fvirt-inspector.c;h=68f8b46af9b70cd694c15cd44c079a3636ec24f2;hb=ff6065063335194a8cac88be2d213047bf18a891;hp=d3e00a9cfc3a192e820be71f04d1d3e859668ed9;hpb=75893a554c374f59318844bca3433e6a2d6c774b;p=libguestfs.git diff --git a/inspector/virt-inspector.c b/inspector/virt-inspector.c index d3e00a9..68f8b46 100644 --- a/inspector/virt-inspector.c +++ b/inspector/virt-inspector.c @@ -331,7 +331,7 @@ static void output_root (xmlTextWriterPtr xo, char *root) { char *str; - int i; + int i, r; char buf[32]; char canonical_root[strlen (root) + 1]; @@ -407,6 +407,35 @@ output_root (xmlTextWriterPtr xo, char *root) free (str); ); + str = guestfs_inspect_get_format (g, root); + if (!str) exit (EXIT_FAILURE); + if (STRNEQ (str, "unknown")) + XMLERROR (-1, + xmlTextWriterWriteElement (xo, BAD_CAST "format", + BAD_CAST str)); + free (str); + + r = guestfs_inspect_is_live (g, root); + if (r > 0) { + XMLERROR (-1, + xmlTextWriterStartElement (xo, BAD_CAST "live")); + XMLERROR (-1, xmlTextWriterEndElement (xo)); + } + + r = guestfs_inspect_is_netinst (g, root); + if (r > 0) { + XMLERROR (-1, + xmlTextWriterStartElement (xo, BAD_CAST "netinst")); + XMLERROR (-1, xmlTextWriterEndElement (xo)); + } + + r = guestfs_inspect_is_multipart (g, root); + if (r > 0) { + XMLERROR (-1, + xmlTextWriterStartElement (xo, BAD_CAST "multipart")); + XMLERROR (-1, xmlTextWriterEndElement (xo)); + } + output_mountpoints (xo, root); output_filesystems (xo, root);