qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] OPT_SIZE parsing


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] OPT_SIZE parsing
Date: Tue, 17 Nov 2009 20:19:09 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20091014 Fedora/3.0-2.8.b4.fc11 Lightning/1.0pre Thunderbird/3.0b4

On 11/17/09 19:11, Ian Molton wrote:
Gerd Hoffmann wrote:
Maybe also create a common function for parsing called by both
parse_size() and parse_option_size() to make sure OPT_SIZE and the new
size property accept the same syntax?

The thought crossed my mind, but then I thought that as none of the
other parsers share common code (yet), it didn't make sense.

Well, when the parser is basically a simple strtoull() call it doesn't make sense. For the size and the postfix processing it makes sense IMHO, they easily get out of sync otherwise. For a 'bool' property (if qdev gets one some day) it would make sense too I think.

I can cook up another patch that allows the option parser to hook into
the property parsing functions, or vice-versa, if you like?

Given that qemu-option.c is also used by the tools (qemu-img, ...) it will be much easier to have qdev use a option parser function than the other way around.

Otherwise it looks fine to me.

Cool - whats the submission procedure? I can make a git branch publicly
available or I can send patches to someone...

Just send it to the list, one of the maintainers with commit access (most likely anthony) should pick it up. If it doesn't work try resending after 2-3 weeks.

cheers,
  Gerd




reply via email to

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