|
From: | Gerd Hoffmann |
Subject: | Re: [Qemu-devel] [PATCH 06/19] Add qemu_opts_validate() for post parsing validation |
Date: | Fri, 11 Sep 2009 15:51:32 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Lightning/1.0pre Thunderbird/3.0b3 |
On 09/11/09 14:38, Mark McLoughlin wrote:
On Fri, 2009-09-11 at 09:47 +0200, Gerd Hoffmann wrote:(1) We can stick all possible values info QemuOptsList->desc. Then have separate data structures to describe which fields are allowed in which cases (and, while being at it, which fields are mandatory).You'd need to make it part of the QemuOptDesc to make it easy to figure out from reading the code which parameters apply to which types. e.g. a QemuOptDesc::firstname_values field
Yes, that would work as well.
(2) We have multiple QemuOptDesc lists for the different cases.As with what I did, you'll have some parameters which are common to different types.
One of the reasons I'd prefer (1). cheers, Gerd
[Prev in Thread] | Current Thread | [Next in Thread] |