qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 08/15] tap: Convert net_init_tap_one() to Err


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v2 08/15] tap: Convert net_init_tap_one() to Error
Date: Tue, 19 May 2015 13:52:39 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

On Fri, May 15, 2015 at 01:58:56PM +0200, Markus Armbruster wrote:
> @@ -644,30 +644,28 @@ static int net_init_tap_one(const NetdevTapOptions 
> *tap, NetClientState *peer,
>          if (tap->has_vhostfd || tap->has_vhostfds) {
>              vhostfd = monitor_fd_param(cur_mon, vhostfdname, &err);
>              if (vhostfd == -1) {
> -                error_report_err(err);
> -                return -1;
> +                error_propagate(errp, err);
> +                return;
>              }
>          } else {
>              vhostfd = open("/dev/vhost-net", O_RDWR);
>              if (vhostfd < 0) {
> -                error_report("tap: open vhost char device failed: %s",
> -                           strerror(errno));
> -                return -1;
> +                error_setg_errno(errp, errno,
> +                                 "tap: open vhost char device failed: %s");
> +                return;

%s must be removed since error_setg_errno() already prints the error
string and we have no format string argument.

If there are no other issues I'll do this when merging the patch.

Attachment: pgpkeF1yFOO04.pgp
Description: PGP signature


reply via email to

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