[Libguestfs] [PATCH v2 3/5] lib: qemu: Run QMP ‘query-commands’, ‘query-qmp-schema’ against the qemu binary.

Pino Toscano ptoscano at redhat.com
Tue Sep 12 13:05:51 UTC 2017


On Tuesday, 12 September 2017 14:29:14 CEST Richard W.M. Jones wrote:
> This adds two extra tests using QMP (the QEMU Monitor Protocol).  This
> allows us to get extra information about the qemu binary beyond what
> is available from the version number or ‘qemu -help’.
> ---
>  lib/qemu.c | 177 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 175 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/qemu.c b/lib/qemu.c
> index bdd9947a8..34775041f 100644
> --- a/lib/qemu.c
> +++ b/lib/qemu.c
> @@ -37,6 +37,8 @@
>  
>  #include <libxml/uri.h>
>  
> +#include <yajl/yajl_tree.h>
> +
>  #include "ignore-value.h"
>  
>  #include "guestfs.h"
> @@ -50,9 +52,13 @@ struct qemu_data {
>  
>    char *qemu_help;              /* Output of qemu -help. */
>    char *qemu_devices;           /* Output of qemu -device ? */
> +  char *qmp_commands;           /* Output of QMP query-commands. */
> +  char *qmp_schema;             /* Output of QMP query-qmp-schema. */

Considering we keep them as parsed by yajl, wouldn't it better to avoid
keeping the raw outputs too?

Also the result of query-commands does not seem to be used in other
patches this series.  Is it going to be used in another followup
series?

-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20170912/91d0adfc/attachment.sig>


More information about the Libguestfs mailing list