From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=57883 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OLetU-0001CM-D3 for qemu-devel@nongnu.org; Mon, 07 Jun 2010 12:09:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OLetP-0004fc-65 for qemu-devel@nongnu.org; Mon, 07 Jun 2010 12:09:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:25335) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OLetO-0004fM-Vi for qemu-devel@nongnu.org; Mon, 07 Jun 2010 12:09:39 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o57G9cMA004739 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 7 Jun 2010 12:09:38 -0400 Date: Mon, 7 Jun 2010 17:09:35 +0100 From: "Daniel P. Berrange" Message-ID: <20100607160935.GG27291@redhat.com> References: <1275921752-29420-1-git-send-email-berrange@redhat.com> <1275921752-29420-20-git-send-email-berrange@redhat.com> <4C0D1888.7060502@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C0D1888.7060502@redhat.com> Subject: [Qemu-devel] Re: [PATCH 19/19] Add a -capabilities argument to allow easy query for static QEMU info Reply-To: "Daniel P. Berrange" List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org On Mon, Jun 07, 2010 at 06:04:24PM +0200, Paolo Bonzini wrote: > 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? Yeah, I didn't much like adding more to vl.c or monitor.c. I can move this to a new file, or a different existing one if there are any other better suggestions Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|