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: 674860 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 ozlabs.org (Postfix) with ESMTPS id 3sj6cV72Lqz9s4x for ; Mon, 26 Sep 2016 12:00:26 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=comstyle.com header.i=@comstyle.com header.b=YJEhNxnR; dkim-atps=neutral Received: from localhost ([::1]:41181 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boLDR-0004oX-8c for incoming@patchwork.ozlabs.org; Sun, 25 Sep 2016 22:00:21 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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) {