Received: from eggs.gnu.org ([2001:4830:134:3::10]:43362) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpQM2-0000mZ-DN for qemu-devel@nongnu.org; Wed, 28 Sep 2016 21:41:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bpQLy-0003mY-AF for qemu-devel@nongnu.org; Wed, 28 Sep 2016 21:41:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35014) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpQLy-0003l0-3n for qemu-devel@nongnu.org; Wed, 28 Sep 2016 21:41:38 -0400 References: <20160926015829.GA71916@humpty.home.comstyle.com> <3686acfc-a8c7-f562-a7cc-2893bb2486e1@redhat.com> From: Jason Wang Message-ID: <8dd5aafe-8d05-7605-83f2-93d234274038@redhat.com> Date: Thu, 29 Sep 2016 09:41:30 +0800 MIME-Version: 1.0 In-Reply-To: <3686acfc-a8c7-f562-a7cc-2893bb2486e1@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] tap-bsd: OpenBSD uses tap(4) now List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth , Brad Smith , qemu-devel@nongnu.org On 2016=E5=B9=B409=E6=9C=8826=E6=97=A5 18:35, Thomas Huth wrote: > On 26.09.2016 03:58, Brad Smith wrote: >> Update the tap-bsd code now that OpenBSD uses tap(4). >> >> Signed-off-by: Brad Smith >> >> >> diff --git a/net/tap-bsd.c b/net/tap-bsd.c >> index c506ac3..8d0f049 100644 >> --- a/net/tap-bsd.c >> +++ b/net/tap-bsd.c >> @@ -55,11 +55,7 @@ int tap_open(char *ifname, int ifname_size, int *vn= et_hdr, >> if (*ifname) { >> snprintf(dname, sizeof dname, "/dev/%s", ifname); >> } else { >> -#if defined(__OpenBSD__) >> - snprintf(dname, sizeof dname, "/dev/tun%d", i); >> -#else >> snprintf(dname, sizeof dname, "/dev/tap%d", i); >> -#endif >> } >> TFR(fd =3D open(dname, O_RDWR)); >> if (fd >=3D 0) { > Looking at http://man.openbsd.org/tap.4 it seems like OpenBSD is indeed > supporting /dev/tap nowadays, so: A question is what happens if we are using old version of OpenBSD which=20 does not have tap? > > Reviewed-by: Thomas Huth > > > PS: Please make sure to CC: the QEMU subsystem maintainer (see > MAINTAINERS or use scripts/get_maintainer.pl) to make sure that your > patches do not get lost in the high traffic of the qemu-devel mailing l= ist. > >