Received: from [140.186.70.92] (port=54966 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q0FAF-0002z2-FE for qemu-devel@nongnu.org; Thu, 17 Mar 2011 11:31:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q0F5w-0006Ox-An for qemu-devel@nongnu.org; Thu, 17 Mar 2011 11:26:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32967) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q0F5w-0006Oj-1G for qemu-devel@nongnu.org; Thu, 17 Mar 2011 11:26:36 -0400 From: Markus Armbruster Subject: Re: [Qemu-devel] Re: [RFC] QCFG: a new mechanism to replace QemuOpts and option handling References: <4D7E5507.8010205@codemonkey.ws> <4D7F4BBC.6010509@redhat.com> <4D7F6BAB.8040709@codemonkey.ws> <4D7F6EF3.2010504@redhat.com> Date: Thu, 17 Mar 2011 16:26:30 +0100 In-Reply-To: <4D7F6EF3.2010504@redhat.com> (Kevin Wolf's message of "Tue, 15 Mar 2011 14:51:47 +0100") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Chris Wright , qemu-devel , Stefan Hajnoczi , Adam Litke Kevin Wolf writes: > Am 15.03.2011 14:37, schrieb Anthony Liguori: >> On 03/15/2011 06:21 AM, Kevin Wolf wrote: >>> Am 14.03.2011 18:48, schrieb Anthony Liguori: >>>> I've got a spec written up at http://wiki.qemu.org/Features/QCFG. >>>> Initial code is in my QAPI tree. >>> One question about a small detail on this wiki page: >>> >>>> typedef struct BlockdevConfig { >>>> char * file; >>>> struct BlockdevConfig * backing_file; >>>> >>>> struct BlockdevConfig * next; >>>> } BlockdevConfig; >>> What is the 'next' pointer used for, >> >> This is a standard part of QAPI. All types get a next pointer added >> such that we can support lists of complex types. > > Only a single list for each object. Don't even think of trees. Yuck. >>> are you going to store a list of >>> all -blockdev options used? And why isn't it a QLIST or something? >> >> Two reasons. QLIST requires another type for the head of the list which >> would complicate things overall. Second is that these types are part of >> the libqmp interface and I didn't want to force qemu-queue on any >> consumer of libqmp. > > And now you force existing qemu code to go back to open coded lists, > which is arguably a step backwards. I don't think this is any better > than forcing the (non-existent) users of libqmp to include one > additional header file. Agree. Let's not screw up our internal interfaces for the sake of an external interface that may or may not turn out to be viable.