From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MTWfY-0005SQ-9d for qemu-devel@nongnu.org; Wed, 22 Jul 2009 03:55:20 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MTWfU-0005SE-0j for qemu-devel@nongnu.org; Wed, 22 Jul 2009 03:55:19 -0400 Received: from [199.232.76.173] (port=36238 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MTWfT-0005SB-Rt for qemu-devel@nongnu.org; Wed, 22 Jul 2009 03:55:15 -0400 Received: from mx20.gnu.org ([199.232.41.8]:14056) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MTWfT-0000Oi-9g for qemu-devel@nongnu.org; Wed, 22 Jul 2009 03:55:15 -0400 Received: from mx2.redhat.com ([66.187.237.31]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MTWfR-0007pm-Vi for qemu-devel@nongnu.org; Wed, 22 Jul 2009 03:55:14 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n6M7tCBB018687 for ; Wed, 22 Jul 2009 03:55:12 -0400 Message-ID: <4A66C5DA.1030609@redhat.com> Date: Wed, 22 Jul 2009 09:55:06 +0200 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH v3 4/5] QemuOpts: framework for storing and parsing options. References: <1247756224-19219-1-git-send-email-kraxel@redhat.com> <1247756224-19219-5-git-send-email-kraxel@redhat.com> <4A602234.50208@redhat.com> <4A65C9B1.8090200@redhat.com> <4A65E5AB.1030506@redhat.com> <4A66B8AD.90107@redhat.com> <4A66C040.8010204@redhat.com> In-Reply-To: <4A66C040.8010204@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org On 07/22/09 09:31, Kevin Wolf wrote: > Gerd Hoffmann schrieb: >> On 07/21/09 17:58, Kevin Wolf wrote: >>> Right, this is one of the points I thought of. Another one is that there >>> are some variants in use with a required first parameter that doesn't >>> have a name (like nic in -net nic,model=xyz). I guess, there are some >>> more details that are not completely covered. >> -net is a very special beast as the list of parameters is very different >> for -net nic, -net tap, -net user, ... >> >> So it probably makes sense to have a separate QemuOptsList for each of >> them instead of storing a "type=[nic|tap|user]" into a common net list. > > I agree, -net should be done different, so this was a bad example. But I > thought we had more of them. -boot is an option with implicit first > parameter name, and there was at least a discussion on making -smp > another one. There might be more. > > Or do you want to keep the old parsing code for these options? I want QemuOpts be good enough for everybody. There should be no need for the old parsing code long-term. >> Yep, so we have one place where we catch parse errors instead of having >> each callsite to check for qemu_opt_get_$type() failures. > > Sounds great. Now it just needs to be implemented. ;-) Working on it ;) cheers, Gerd