qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 14/34] qcow2: Factor out qcow2_update_options()


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 14/34] qcow2: Factor out qcow2_update_options()
Date: Wed, 13 May 2015 11:04:29 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

On 05/13/2015 03:11 AM, Kevin Wolf wrote:
> Am 12.05.2015 um 22:04 hat Eric Blake geschrieben:
>> On 05/08/2015 11:21 AM, Kevin Wolf wrote:
>>> Eventually we want to be able to change options at runtime. As a first
>>> step towards that goal, separate some option handling code from the
>>> general initialisation code in qcow2_open().
>>>
>>> Signed-off-by: Kevin Wolf <address@hidden>
>>> ---
>>>  block/qcow2.c | 135 
>>> +++++++++++++++++++++++++++++++++-------------------------
>>>  1 file changed, 76 insertions(+), 59 deletions(-)
>>>
>>> +    } else {
>>> +        error_setg(errp, "Unsupported value '%s' for qcow2 option "
>>> +                   "'overlap-check'. Allowed are either of the following: "
>>> +                   "none, constant, cached, all", opt_overlap_check);
>>
>> Pre-existing due to code motion, but I find s/either/any/ easier to read.
> 
> Isn't "either" only for a choice between two things anyway?

Exactly. And since there are four things, that's why I found it easier
to read.

> 
> The series isn't long enough yet, I'll fix it. :-)

If you want conciseness, this would also work:

"Unsupported value '%s' for qcow2 option 'overlap-check'; expecting one
of: none, constant, cached, all"

or even omitting the list of valid options altogether (which in the long
run is easier to maintain if we anticipate extending the list - as there
are fewer places where copies of the list need to be kept in sync)

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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