qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tap-bsd: Remove special casing for older OpenBSD releases
@ 2021-03-26 23:49 Brad Smith
  2021-03-29  2:22 ` Jason Wang
  0 siblings, 1 reply; 9+ messages in thread
From: Brad Smith @ 2021-03-26 23:49 UTC (permalink / raw)
  To: qemu-devel; +Cc: Jason Wang

OpenBSD added support for tap(4) 10 releases ago.

Remove the special casing for older releases.


Signed-off-by: Brad Smith <brad@comstyle.com>

diff --git a/net/tap-bsd.c b/net/tap-bsd.c
index 77aaf674b1..59dfcdfae0 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) {


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-05-06  3:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-26 23:49 [PATCH] tap-bsd: Remove special casing for older OpenBSD releases Brad Smith
2021-03-29  2:22 ` Jason Wang
2021-03-29  3:03   ` Brad Smith
2021-03-29  3:58     ` Jason Wang
2021-03-29 20:38       ` Brad Smith
2021-04-01  7:24         ` Jason Wang
2021-05-02  4:10           ` Brad Smith
2021-05-06  2:19             ` Jason Wang
2021-05-06  3:16               ` Brad Smith

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).