X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;ds=sidebyside;f=inspector%2Fvirt-inspector.c;h=4d8e3adc1c11d52b7a4b795ba638638b027850fd;hb=b41e73008a939ef493d2bfb82c9bd07b0f74736a;hp=68f8b46af9b70cd694c15cd44c079a3636ec24f2;hpb=c2f2a2c6769be908b25b0946f39770d09bb6ddc9;p=libguestfs.git diff --git a/inspector/virt-inspector.c b/inspector/virt-inspector.c index 68f8b46..4d8e3ad 100644 --- a/inspector/virt-inspector.c +++ b/inspector/virt-inspector.c @@ -1,5 +1,5 @@ /* virt-inspector - * Copyright (C) 2010 Red Hat Inc. + * Copyright (C) 2010-2011 Red Hat Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -38,6 +39,7 @@ guestfs_h *g; int read_only = 1; +int live = 0; int verbose = 0; int keys_from_stdin = 0; int echo_keys = 0; @@ -226,6 +228,7 @@ main (int argc, char *argv[]) */ assert (read_only == 1); assert (inspector == 1); + assert (live == 0); /* Must be no extra arguments on the command line. */ if (optind != argc) @@ -370,6 +373,13 @@ output_root (xmlTextWriterPtr xo, char *root) xmlTextWriterWriteElement (xo, BAD_CAST "product_name", BAD_CAST str)); free (str); + str = guestfs_inspect_get_product_variant (g, root); + if (!str) exit (EXIT_FAILURE); + if (STRNEQ (str, "unknown")) + XMLERROR (-1, + xmlTextWriterWriteElement (xo, BAD_CAST "product_variant", BAD_CAST str)); + free (str); + i = guestfs_inspect_get_major_version (g, root); snprintf (buf, sizeof buf, "%d", i); XMLERROR (-1,