From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=33579 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OLeoR-0005hE-7N for qemu-devel@nongnu.org; Mon, 07 Jun 2010 12:04:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OLeoP-0003ib-Iw for qemu-devel@nongnu.org; Mon, 07 Jun 2010 12:04:30 -0400 Received: from mail-wy0-f173.google.com ([74.125.82.173]:58092) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OLeoP-0003iU-Dq for qemu-devel@nongnu.org; Mon, 07 Jun 2010 12:04:29 -0400 Received: by wyb36 with SMTP id 36so2707249wyb.4 for ; Mon, 07 Jun 2010 09:04:28 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4C0D1888.7060502@redhat.com> Date: Mon, 07 Jun 2010 18:04:24 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1275921752-29420-1-git-send-email-berrange@redhat.com> <1275921752-29420-20-git-send-email-berrange@redhat.com> In-Reply-To: <1275921752-29420-20-git-send-email-berrange@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 19/19] Add a -capabilities argument to allow easy query for static QEMU info List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: qemu-devel@nongnu.org On 06/07/2010 04:42 PM, Daniel P. Berrange wrote: > The QMP monitor provides a number of commands for querying info about > the QEMU binary capabilities. Given that these commands don't take > any options and just return static data, requiring the use of QMP is > unnecessarily onerous. This adds a new '-capabilities' command line > argument as a syntactic sugar for accessing the QMP commands that > just return static QEMU binary capabilities. > > Setting the '-capabilities' argument causes QEMU to output the requested > data on stdout, pretty printed in JSON format. The argument expects an > associated value to identify the data to be printed. This can be one of > the strings version|machines|devices|cputypes|target|commands|argv|netdev > > To query all possible data at once, the shorthand 'all' is allowed. > > The output is a QDict where the key is the type of data requested, and > the value is the JSON data from the associated monitor command. For > example: A lot of this patch and the other monitor.c changes you had can likely be moved in a capabilities.c file? Paolo