On Sep 9, 2015, at 6:31 PM, Eric Blake wrote: > 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); >
I only chose the quit command because it looked very short and simple to try. Would you know how to create a QDict, QObject, and QemuOpts objects?