[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 4/5] QemuOpts: framework for storing and pars
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH v3 4/5] QemuOpts: framework for storing and parsing options. |
Date: |
Tue, 21 Jul 2009 09:42:00 +0200 |
User-agent: |
Thunderbird 2.0.0.21 (X11/20090320) |
Gerd Hoffmann schrieb:
> On 07/17/09 09:03, Kevin Wolf wrote:
>> Gerd Hoffmann schrieb:
>>> This stores device parameters in a better way than unparsed strings.
>>>
>>> New types:
>>> QemuOpt - one key-value pair.
>>> QemuOpts - group of key-value pairs, belonging to one
>>> device, i.e. one drive.
>>> QemuOptsList - list of some kind of devices, i.e. all drives.
>> What about having the options typed like I did in qemu-option.[ch]?
>
> Oh, I didn't see that. I just looked at the (old) parsing code in vl.c
> uses by almost everybody.
Actually, some parts of this parsing code have moved to qemu-option.c.
Probably they should all be moved (or replaced), but I did it only for
the functions I needed in qemu-img.
>> In general qemu-option seems to do more parsing/checking than QemuOpts
>> does, on the other hand it's not yet generic enough to suit everything.
>> Maybe a combination of both would be the right thing?
>
> I'll have a closer look. Who uses qemu-options? qemu-io I assume?
It's currently only used for image creation. Since recently, image
formats can provide driver specific options. You can find the call to
the parser in qemu-img.c in img_create() and img_check(). The definition
of the supported options are usually at the end of the block driver
source file.
Kevin
- [Qemu-devel] [PATCH v3 0/5] cleanup drive handling., Gerd Hoffmann, 2009/07/16
- [Qemu-devel] [PATCH v3 2/5] add support for drive ids., Gerd Hoffmann, 2009/07/16
- [Qemu-devel] [PATCH v3 4/5] QemuOpts: framework for storing and parsing options., Gerd Hoffmann, 2009/07/16
- [Qemu-devel] Re: [PATCH v3 4/5] QemuOpts: framework for storing and parsing options., Jan Kiszka, 2009/07/16
- Re: [Qemu-devel] [PATCH v3 4/5] QemuOpts: framework for storing and parsing options., Kevin Wolf, 2009/07/17
- Re: [Qemu-devel] [PATCH v3 4/5] QemuOpts: framework for storing and parsing options., Gerd Hoffmann, 2009/07/21
- Re: [Qemu-devel] [PATCH v3 4/5] QemuOpts: framework for storing and parsing options., Kevin Wolf, 2009/07/21
- Re: [Qemu-devel] [PATCH v3 4/5] QemuOpts: framework for storing and parsing options., Gerd Hoffmann, 2009/07/22
- Re: [Qemu-devel] [PATCH v3 4/5] QemuOpts: framework for storing and parsing options., Kevin Wolf, 2009/07/22
- Re: [Qemu-devel] [PATCH v3 4/5] QemuOpts: framework for storing and parsing options., Gerd Hoffmann, 2009/07/22
[Qemu-devel] [PATCH v3 3/5] kill drives_opt, Gerd Hoffmann, 2009/07/16
[Qemu-devel] [PATCH v3 5/5] switch -drive to QemuOpts., Gerd Hoffmann, 2009/07/16