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

Re: [PATCH 12/14] error: Use error_setg_errno() for simplicity and consistency



"Dr. David Alan Gilbert" <dave@xxxxxxxxxxx> writes:

> * Markus Armbruster (armbru@xxxxxxxxxx) wrote:
>> Use error_setg_errno() instead of passing the value of strerror() or
>> g_strerror() to error_setg().
>> 
>> The separator between the error message proper and the value of
>> strerror() changes from " : ", "", " - ", "- " to ": " in places.
>> 
>> Signed-off-by: Markus Armbruster <armbru@xxxxxxxxxx>
>
>> @@ -792,9 +792,9 @@ static void vfu_object_init_ctx(VfuObject *o, Error 
>> **errp)
>>                             VFU_REGION_FLAG_RW | VFU_REGION_FLAG_ALWAYS_CB,
>>                             NULL, 0, -1, 0);
>>      if (ret < 0) {
>> -        error_setg(errp,
>> -                   "vfu: Failed to setup config space handlers for %s- %s",
>> -                   o->device, strerror(errno));
>> +        error_setg_errno(errp,
>> +                         "vfu: Failed to setup config space handlers for 
>> %s",
>> +                         o->device);
>
> missing errno.

Yes.

>>          goto fail;
>>      }
>>  
>> @@ -822,8 +822,8 @@ static void vfu_object_init_ctx(VfuObject *o, Error 
>> **errp)
>>  
>>      ret = vfu_realize_ctx(o->vfu_ctx);
>>      if (ret < 0) {
>> -        error_setg(errp, "vfu: Failed to realize device %s- %s",
>> -                   o->device, strerror(errno));
>> +        error_setg_errno(errp, "vfu: Failed to realize device %s",
>> +                         o->device);
>
> missing errno.

Yes.  Another file my build tree doesn't compile anymore.  Will fix,
thanks!

[...]




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.