On 09/15/2017 05:42 PM, Eric Blake wrote:
> On 09/15/2017 04:35 PM, John Snow wrote:
>>
>>
>> On 08/04/2017 06:26 AM, Mao Zhongyi wrote:
>>> Replace init with realize in IDEDeviceClass, which has errp
>>> as a parameter. So all the implementations now use error_setg
>>> instead of error_report for reporting error.
>>>
> 
>>> @@ -2398,7 +2399,7 @@ int ide_init_drive(IDEState *s, BlockBackend *blk, 
>>> IDEDriveKind kind,
>>>                     const char *version, const char *serial, const char 
>>> *model,
>>>                     uint64_t wwn,
>>>                     uint32_t cylinders, uint32_t heads, uint32_t secs,
>>> -                   int chs_trans)
>>> +                   int chs_trans, Error **errp)
>>
>> this function now requires an additional invariant, which is that we
>> must return -1 AND set errp. Probably wisest to just get rid of the
>> return code so that we don't accidentally goof this up in the future.
>>
>> I think Markus has had some guidance on this in the past, but admittedly
>> I can't remember his preference.
> 

[...]

> So these days, the preference is to KEEP the redundancy rather than
> eliminate it, due to ease-of-use concerns.
> 

OK, that's fine. I only want consistency with whatever the
paradigm-du-jour is for error handling. Thanks for the quick rebuttal.

--js

Reply via email to