qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/4] Rename DriveInfo.onerror to on_write_error


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH 1/4] Rename DriveInfo.onerror to on_write_error
Date: Fri, 04 Dec 2009 09:18:58 +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 Thunderbird/3.0b4

Am 03.12.2009 20:55, schrieb Anthony Liguori:
> Gleb Natapov wrote:
>> On Fri, Nov 27, 2009 at 01:25:36PM +0100, Kevin Wolf wrote:
>>   
>>> Either rename variables and functions to refer to write errors (which is 
>>> what
>>> they actually do) or introduce a parameter to distinguish reads and writes.
>>>
>>>     
>> I prefer either to use two different functions or hide 0/1 parameter behind
>> a macro:
>>  #define drive_get_on_write_error(a) drive_get_on_error(a, 0);
>>   
> 
> Or a static inline.  But honestly, having three globally scoped 
> functions shouldn't be a problem.

Well, in the end, the callers already have some kind of is_read and just
pass it on. Would we really gain anything if they needed to put a
five-line if block there instead of a one-line function call (or maybe
two lines if they need to extract the is_read flag from somewhere)?

So, I'm happy to add your static inline functions, but I wouldn't like
to use them...

Kevin




reply via email to

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