qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 11/15] tap-linux: Convert tap_open() to Error


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 11/15] tap-linux: Convert tap_open() to Error
Date: Thu, 14 May 2015 15:52:35 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

On 05/12/2015 06:03 AM, Markus Armbruster wrote:
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
>  net/tap-linux.c | 17 +++++++++--------
>  1 file changed, 9 insertions(+), 8 deletions(-)
> 

> @@ -47,7 +46,7 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr,
>  
>      TFR(fd = open(PATH_NET_TUN, O_RDWR));
>      if (fd < 0) {
> -        error_report("could not open %s: %m", PATH_NET_TUN);
> +        error_setg_errno(errp, errno, "could not open %s", PATH_NET_TUN);

Oh nice - gets rid of non-portable uses of %m (of course, the file is
only compiled on Linux where %m is supported, so it is not a bug fix).

Reviewed-by: Eric Blake <address@hidden>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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