From patchwork Mon Sep 26 01:58:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brad Smith X-Patchwork-Id: 9350105 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AFBEC6077A for ; Mon, 26 Sep 2016 01:59:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9691828D1E for ; Mon, 26 Sep 2016 01:59:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8A06128D1C; Mon, 26 Sep 2016 01:59:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E53EC28D21 for ; Mon, 26 Sep 2016 01:59:49 +0000 (UTC) Received: from localhost ([::1]:41170 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boLCt-0004FH-7G for patchwork-qemu-devel@patchwork.kernel.org; Sun, 25 Sep 2016 21:59:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33777) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boLCX-0004E7-65 for qemu-devel@nongnu.org; Sun, 25 Sep 2016 21:59:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1boLCR-0007wl-CH for qemu-devel@nongnu.org; Sun, 25 Sep 2016 21:59:24 -0400 Received: from speedy.comstyle.com ([2001:470:1d:8c::2]:15446 helo=mail.comstyle.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boLCR-0007oh-4y for qemu-devel@nongnu.org; Sun, 25 Sep 2016 21:59:19 -0400 Received: from mail.comstyle.com (localhost [127.0.0.1]) by mail.comstyle.com (Postfix) with ESMTP id 838D49882E for ; Sun, 25 Sep 2016 21:59:11 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=comstyle.com; h=date:from :to:subject:message-id:mime-version:content-type; s=selector1; bh=CEfCLEsxko1Q3Ys1WBCG6oyDZeA=; b=YJEhNxnRQzMuxhQUZXCVkAl/JDAo MordLe1whJQay8/VIsbBJYTnYQekls1ga1+lAaKOrBOd/kORm7ot6s9beKfZqdLZ YC9YEsbl+jr6bKXDnrkvB0MFol0eDRObaaiW64FWleAdnn5AdWF5otyHVejxdCTE X7PWTUtauWImO48= DomainKey-Signature: a=rsa-sha1; c=nofws; d=comstyle.com; h=date:from:to :subject:message-id:mime-version:content-type; q=dns; s= selector1; b=i7JRWEpKb9ky9TS/zhaSccqkG0t4NJY8db0YoAnE61dYTyF6AU0 AK8/JVQxHBFzkCcQEcRcfy+uEmTxtRzNtmq74VbGrJ2XzTaayjzmaL30CxHNitaP o1M9bJ9qV7K0SUHga3ZqJsUAA/5OFk1xxnN120aXHt/SY69vMeR2c7sU= Received: from humpty.home.comstyle.com (CPE80ee73768e89-CMbc4dfbc8cbe0.cpe.net.cable.rogers.com [99.226.98.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: brad) by mail.comstyle.com (Postfix) with ESMTPSA id 5EA8B9882D for ; Sun, 25 Sep 2016 21:59:11 -0400 (EDT) Date: Sun, 25 Sep 2016 21:58:33 -0400 From: Brad Smith To: qemu-devel@nongnu.org Message-ID: <20160926015829.GA71916@humpty.home.comstyle.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.6.2 (2016-07-01) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:470:1d:8c::2 Subject: [Qemu-devel] [PATCH] tap-bsd: OpenBSD uses tap(4) now X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Update the tap-bsd code now that OpenBSD uses tap(4). Signed-off-by: Brad Smith Reviewed-by: Thomas Huth 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 *vnet_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 = open(dname, O_RDWR)); if (fd >= 0) {