On 09/09/2015 04:25 PM, Eric Blake wrote:
>> That leaves QMP. I am trying to figure it out. This is my attempt so far:
>>
>> Error **errp;
>> char *commandBuffer;
>> commandBuffer = g_strdup_printf("{ \"execute\": \"quit\" }");
>> qmp_query_command_line_options(false, commandBuffer, errp);
>> printf("Program should quit now\n");
>>
And if you're trying quit, then query-command-line-options is not how
you do it. In QMP, quitting is done by:
{ "execute":"quit" }
which per qmp-commands.hx is serviced by qmp_marshal_quit() [was
qmp_marshal_input_quit()], which calls into qmp_quit(). So if you're
trying to quit qemu, you would do:
Error *err;
qmp_quit(&err);
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
