qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH v3 4/5] QemuOpts: framework for storing and pars


From: Gerd Hoffmann
Subject: [Qemu-devel] Re: [PATCH v3 4/5] QemuOpts: framework for storing and parsing options.
Date: Thu, 16 Jul 2009 20:50:39 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Lightning/1.0pre Thunderbird/3.0b2

On 07/16/09 18:35, Jan Kiszka wrote:
Gerd Hoffmann wrote:
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.

Functions are provided to work with these types.  The plan is that some
day we will pass around QemuOpts pointers instead of strings filled with
"key1=value1,key2=value2".

Will this also be able to handle the "-net<type>[,options=...]" special
case? Then it would be really great and could save us a lot of ugly code.

I don't see fundamental problems, I've tried to make it generic enough that it can fit for everything. If it doesn't we should fix it ;)

I think we could either have a additional 'type' field added to QemuOpts, or we use a separate QemuOptsList for each net type.

I'd tend to use the separate list approach because the list of valid options is linked to QemuOptsList, and each net type has a different set of options.

cheers,
  Gerd




reply via email to

[Prev in Thread] Current Thread [Next in Thread]