From: Jason Wang <jasowang@redhat.com>
To: peter.maydell@linaro.org
Cc: Jason Wang <jasowang@redhat.com>,
qemu-devel@nongnu.org, Brad Smith <brad@comstyle.com>
Subject: [PULL 3/3] tap-bsd: Remove special casing for older OpenBSD releases
Date: Wed, 26 May 2021 16:24:52 +0800 [thread overview]
Message-ID: <1622017492-7770-4-git-send-email-jasowang@redhat.com> (raw)
In-Reply-To: <1622017492-7770-1-git-send-email-jasowang@redhat.com>
From: Brad Smith <brad@comstyle.com>
OpenBSD added support for tap(4) 10 releases ago.
Remove the special casing for older releases.
Signed-off-by: Brad Smith <brad@comstyle.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
net/tap-bsd.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/net/tap-bsd.c b/net/tap-bsd.c
index 77aaf67..59dfcdf 100644
--- a/net/tap-bsd.c
+++ b/net/tap-bsd.c
@@ -35,10 +35,6 @@
#include <net/if_tap.h>
#endif
-#if defined(__OpenBSD__)
-#include <sys/param.h>
-#endif
-
#ifndef __FreeBSD__
int tap_open(char *ifname, int ifname_size, int *vnet_hdr,
int vnet_hdr_required, int mq_required, Error **errp)
@@ -59,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__) && OpenBSD < 201605
- 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) {
--
2.7.4
next prev parent reply other threads:[~2021-05-26 8:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-26 8:24 [PULL 0/3] Net patches Jason Wang
2021-05-26 8:24 ` [PULL 1/3] hw/net/imx_fec: return 0xffff when accessing non-existing PHY Jason Wang
2021-05-26 9:08 ` Philippe Mathieu-Daudé
2021-05-27 4:28 ` Jason Wang
2021-05-26 8:24 ` [PULL 2/3] virtio-net: failover: add missing remove_migration_state_change_notifier() Jason Wang
2021-05-26 8:24 ` Jason Wang [this message]
2021-05-26 9:09 ` [PULL 0/3] Net patches Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1622017492-7770-4-git-send-email-jasowang@redhat.com \
--to=jasowang@redhat.com \
--cc=brad@comstyle.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).