On 06/02/2015 06:26 AM, Fam Zheng wrote:
> On Tue, 06/02 13:16, Michael Tokarev wrote:
>> 02.06.2015 12:32, Fam Zheng wrote:
>>>          if (ret < 0) {
>>> -            error_report("failed to save vmstate %s", strerror(errno));
>>> +            if (load) {
>>> +                error_report("failed to load vmstate %s", strerror(errno));
>>> +            } else {
>>> +                error_report("failed to save vmstate %s", strerror(errno));
>>> +            }
>>
>>  +            error_report("failed to %s vmstate: %s", load ? "load" : 
>> "save", strerror(errno));
> 
> The reason I didn't use a one-liner was, "git grep 'failed to load vmstate'"
> in the code base would just work, besides my eyes also like the readability.
> 

+1, Error messages should be kept on one line and intact where possible
and convenient. Greppable code is happy code.

>>
>> (note also the addition of ":")
> 
> Yes that applies to all error_report() in this file.
> 
>> (besides what Kevin said).
>>
>> Thanks,
> 
> Thanks,
> 
> Fam
> 

Reply via email to