Received: from eggs.gnu.org ([2001:4830:134:3::10]:42590) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZouK-0004Ou-Qc for qemu-devel@nongnu.org; Wed, 09 Sep 2015 19:36:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZouG-0005Ri-RY for qemu-devel@nongnu.org; Wed, 09 Sep 2015 19:36:04 -0400 Received: from mail-qk0-x229.google.com ([2607:f8b0:400d:c09::229]:33627) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZouG-0005RG-NE for qemu-devel@nongnu.org; Wed, 09 Sep 2015 19:36:00 -0400 Received: by qkdw123 with SMTP id w123so11806136qkd.0 for ; Wed, 09 Sep 2015 16:36:00 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Programmingkid In-Reply-To: <55F0B35D.4080509@redhat.com> Date: Wed, 9 Sep 2015 19:35:58 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: References: <65D87A2B-B94F-4236-A9BB-D0F0B7FCF96B@gmail.com> <26B5A68C-92C9-4528-BA17-4A282DCFF035@gmail.com> <87fv2og36d.fsf@blackfin.pond.sub.org> <9F6A7240-9CB8-41E2-AB87-B74CD7961191@gmail.com> <8737yocap6.fsf@blackfin.pond.sub.org> <16D5C709-5630-4919-BE13-6B1DB4B860F8@gmail.com> <55F0B1C9.8070204@redhat.com> <55F0B35D.4080509@redhat.com> Subject: Re: [Qemu-devel] [PATCH] ui/cocoa.m: Add Mount image file menu item List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Peter Maydell , Markus Armbruster , qemu-devel qemu-devel On Sep 9, 2015, at 6:31 PM, Eric Blake wrote: > On 09/09/2015 04:25 PM, Eric Blake wrote: >=20 >>> That leaves QMP. I am trying to figure it out. This is my attempt so = far: >>>=20 >>> Error **errp; >>> char *commandBuffer; >>> commandBuffer =3D g_strdup_printf("{ \"execute\": \"quit\" }"); >>> qmp_query_command_line_options(false, commandBuffer, errp); >>> printf("Program should quit now\n"); >>>=20 >=20 > And if you're trying quit, then query-command-line-options is not how > you do it. In QMP, quitting is done by: >=20 > { "execute":"quit" } >=20 > 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: >=20 > Error *err; > qmp_quit(&err); >=20 I only chose the quit command because it looked very short and simple to = try.=20 Would you know how to create a QDict, QObject, and QemuOpts objects?