[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 06/19] Add qemu_opts_validate() for post parsing
From: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-devel] [PATCH 06/19] Add qemu_opts_validate() for post parsing validation |
Date: |
Fri, 11 Sep 2009 09:47:53 +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/10/09 17:18, Mark McLoughlin wrote:
Several qemu command line options have a parameter whose value affects
what other parameters are accepted for the option.
In these cases, we can have an empty description table in the
QemuOptsList and once the option has been parsed we can use a suitable
description table to validate the other parameters based on the value of
that parameter.
Hmm. The "empty description" mode is intended to be used in case the
verification isn't done by QemuOpts at all (i.e. for -devices, where the
qdev property code will do the checks). I really like to have the
option description hooked into QemuOptsList.
I can think of two possible ways to do that:
(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).
(2) We have multiple QemuOptDesc lists for the different cases.
I tend to prefer the first. We can do the option parsing
unconditionally in qemu_opt_set() then and don't have two different
possible code paths for that.
Comments? Other ideas?
cheers,
Gerd
- [Qemu-devel] [PATCH 03/19] Remove double error message in qemu_option_set(), (continued)
- [Qemu-devel] [PATCH 08/19] Add qemu_net_opts, Mark McLoughlin, 2009/09/10
- [Qemu-devel] [PATCH 05/19] Make qemu_opts_parse() handle empty strings, Mark McLoughlin, 2009/09/10
- [Qemu-devel] [PATCH 18/19] Port PCI NIC hotplug to QemuOpts, Mark McLoughlin, 2009/09/10
- [Qemu-devel] [PATCH 12/19] Port -net socket to QemuOpts, Mark McLoughlin, 2009/09/10
- [Qemu-devel] [PATCH 06/19] Add qemu_opts_validate() for post parsing validation, Mark McLoughlin, 2009/09/10
- Re: [Qemu-devel] [PATCH 06/19] Add qemu_opts_validate() for post parsing validation,
Gerd Hoffmann <=
[Qemu-devel] [PATCH 10/19] Port -net user to QemuOpts, Mark McLoughlin, 2009/09/10
[Qemu-devel] [PATCH 09/19] Port -net none and -net nic to QemuOpts, Mark McLoughlin, 2009/09/10
[Qemu-devel] [PATCH 16/19] Port host_net_add monitor command to QemuOpts, Mark McLoughlin, 2009/09/10
[Qemu-devel] [PATCH 14/19] Port -net dump to QemuOpts, Mark McLoughlin, 2009/09/10
[Qemu-devel] [PATCH 17/19] Port usb net to QemuOpts, Mark McLoughlin, 2009/09/10
[Qemu-devel] [PATCH 15/19] Clean up legacy code in net_client_init(), Mark McLoughlin, 2009/09/10