Ok, preparing them.

2015-11-06 16:35 GMT+01:00 Eric Blake <ebl...@redhat.com>:
> On 11/06/2015 08:13 AM, Vincenzo Maffione wrote:
>> This update was required to align error reporting of netmap backend
>> initialization to the modifications introduced by commit a30ecde.
>>
>> Signed-off-by: Vincenzo Maffione <v.maffi...@gmail.com>
>> ---
>>  net/clients.h |  4 ++--
>>  net/netmap.c  | 32 ++++++++++++++++----------------
>>  2 files changed, 18 insertions(+), 18 deletions(-)
>>
>
>> +++ b/net/netmap.c
>
>> @@ -99,9 +99,9 @@ static int netmap_open(NetmapPriv *me)
>>
>>      me->fd = fd = open(me->fdname, O_RDWR);
>>      if (fd < 0) {
>> -        error_report("Unable to open netmap device '%s' (%s)",
>> -                        me->fdname, strerror(errno));
>> -        return -1;
>> +        error_setg_errno(errp, errno, "Unable to open netmap device '%s'",
>> +                         me->fdname);
>
> We have error_setg_file_open() for reporting open() failures, if
> consistent messages are desired.
>
>> @@ -125,11 +124,12 @@ static int netmap_open(NetmapPriv *me)
>>      me->nifp = NETMAP_IF(me->mem, req.nr_offset);
>>      me->tx = NETMAP_TXRING(me->nifp, 0);
>>      me->rx = NETMAP_RXRING(me->nifp, 0);
>> -    return 0;
>> +
>> +    return;
>>
>>  error:
>>      close(me->fd);
>> -    return -1;
>> +    return;
>>  }
>
> Dead return, if you wanted to remove it.
>
> Minor enough that I'm okay with it whether or not you make those changes:
> Reviewed-by: Eric Blake <ebl...@redhat.com>
>
> --
> Eric Blake   eblake redhat com    +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>



-- 
Vincenzo Maffione

Reply via email to