From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JwejD-00038g-46 for qemu-devel@nongnu.org; Thu, 15 May 2008 10:46:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JwejB-00037m-I0 for qemu-devel@nongnu.org; Thu, 15 May 2008 10:46:42 -0400 Received: from [199.232.76.173] (port=45815 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JwejB-00037f-DU for qemu-devel@nongnu.org; Thu, 15 May 2008 10:46:41 -0400 Received: from ug-out-1314.google.com ([66.249.92.171]:11651) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JwejA-0003ZT-RD for qemu-devel@nongnu.org; Thu, 15 May 2008 10:46:41 -0400 Received: by ug-out-1314.google.com with SMTP id j40so1439774ugd.4 for ; Thu, 15 May 2008 07:46:38 -0700 (PDT) Message-ID: Date: Thu, 15 May 2008 16:46:37 +0200 From: "andrzej zaborowski" Subject: Re: [Qemu-devel] [PATCH] Add support for a configuration file In-Reply-To: <20080515132208.GB5983@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1210713545-11916-1-git-send-email-aliguori@us.ibm.com> <20080515220340.10e3fa92.mle+tools@mega-nerd.com> <20080515132208.GB5983@redhat.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , qemu-devel@nongnu.org On 15/05/2008, Daniel P. Berrange wrote: > On Thu, May 15, 2008 at 02:36:43PM +0200, andrzej zaborowski wrote: > > On 15/05/2008, Erik de Castro Lopo wrote: > > > One thing I'd like to see is the ability to include one config file > > > inside another. > > > > That's a good idea, I suggested preprocessing with a cpp (-like) tool > > with this in mind. This lets you kindof "make your own" syntax for > > the config file, redefine instead of search&replace, and allows a lib > > like libvirt to have its standard "base" config / "template" config > > that would be included by the generated files and used. > > We don't really have a 'base' template for QEMU - we only specify the args Obviously, because there was no config files until now. What I mean is that instead of writing the full "net {\n user;\n vlan 0;\n"... in every config file you generate, you'd write user_net(0);, where the user_net macro is #defined in the template. With a powerful enough preprocessor you could even have qemu read your XML configuratoins directly, given their DTDs or schemas. With a powerful enough processor qemu could read the raw binary representation of a libvirt internal struct. (I'm not trying to suggest doing any of these of course) -- Please do not print this email unless absolutely necessary. Spread environmental awareness.