aboutsummaryrefslogtreecommitdiffstats
path: root/net/wmwifi
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2005-07-14 05:35:27 +0800
committerpav <pav@FreeBSD.org>2005-07-14 05:35:27 +0800
commit7baa804bff28d9aedbe06807ec0e0349cd3f693a (patch)
tree88e035564b219fa292aded36cf893740d05c0879 /net/wmwifi
parentefc92ce4bc14b675e2b36c153a30b79c10306484 (diff)
downloadfreebsd-ports-gnome-7baa804bff28d9aedbe06807ec0e0349cd3f693a.tar.gz
freebsd-ports-gnome-7baa804bff28d9aedbe06807ec0e0349cd3f693a.tar.zst
freebsd-ports-gnome-7baa804bff28d9aedbe06807ec0e0349cd3f693a.zip
- The code walking the interface list will issue the SIOCGIFMEDIA ioctl to
every interface. This ioctl will fail on if_fwe and if_plip (and probably others). Therefore make the failing ioctl() non-fatal and issue a warning only. PR: ports/83381 Submitted by: Ulrich Spoerlein <q@galgenberg.net> (maintainer)
Diffstat (limited to 'net/wmwifi')
-rw-r--r--net/wmwifi/Makefile1
-rw-r--r--net/wmwifi/files/patch-wireless.c29
-rw-r--r--net/wmwifi/files/patch-wmwifi.c35
3 files changed, 58 insertions, 7 deletions
diff --git a/net/wmwifi/Makefile b/net/wmwifi/Makefile
index cbfc1bbe1dab..41e67504c576 100644
--- a/net/wmwifi/Makefile
+++ b/net/wmwifi/Makefile
@@ -7,6 +7,7 @@
PORTNAME= wmwifi
PORTVERSION= 0.4
+PORTREVISION= 1
DISTVERSIONSUFFIX=-bsd
CATEGORIES= net
MASTER_SITES= http://digitalssg.net/debian/
diff --git a/net/wmwifi/files/patch-wireless.c b/net/wmwifi/files/patch-wireless.c
index 2eb663a1dea3..164624512de7 100644
--- a/net/wmwifi/files/patch-wireless.c
+++ b/net/wmwifi/files/patch-wireless.c
@@ -1,5 +1,5 @@
---- src/wireless.c.orig Sat Jul 2 14:41:48 2005
-+++ src/wireless.c Sat Jul 2 14:41:53 2005
+--- src/wireless.c.orig Tue Mar 9 20:39:17 2004
++++ src/wireless.c Mon Jul 11 10:57:43 2005
@@ -143,6 +143,7 @@
max = get_max_ifs();
@@ -8,3 +8,28 @@
if (old > max)
old = max; /* just be sure to not be out of bounds */
+@@ -193,9 +194,11 @@
+
+ if (ioctl(s, SIOCGIFMEDIA, (caddr_t) &ifmr) < 0)
+ {
+- perror("ioctl");
++ char str[128];
++ snprintf(str, 128, "ioctl for interface %s failed", ifmr.ifm_name);
+ close(s);
+- exit(1);
++ warn(str);
++ continue;
+ }
+ close(s);
+ /* we cannot monitor interfaces in hostap mode, so just
+@@ -207,6 +210,10 @@
+ found++;
+ }
+ }
++
++ if (!found)
++ return -1;
++
+ return index;
+ }
+ /* how many interfaces do we have? this includes non-wireless! */
diff --git a/net/wmwifi/files/patch-wmwifi.c b/net/wmwifi/files/patch-wmwifi.c
index 2e9bde734b5d..586a54e28378 100644
--- a/net/wmwifi/files/patch-wmwifi.c
+++ b/net/wmwifi/files/patch-wmwifi.c
@@ -1,10 +1,35 @@
---- src/wmwifi.c.orig Sat Jul 2 14:54:17 2005
-+++ src/wmwifi.c Sat Jul 2 14:54:21 2005
-@@ -67,6 +67,7 @@
+--- src/wmwifi.c.orig Mon Jul 11 10:58:32 2005
++++ src/wmwifi.c Mon Jul 11 11:01:27 2005
+@@ -67,9 +67,11 @@
int ncolor = 0;
struct wifi wfi;
+- /* find a valid wireless interface */
+ bzero(&wfi, sizeof(wfi));
- /* find a valid wireless interface */
++ /* find a valid wireless interface */
#if __FreeBSD__
- wfi.ifnum = get_wlaniface(0, 1);
+- wfi.ifnum = get_wlaniface(0, 1);
++ if ((wfi.ifnum = get_wlaniface(0, 1)) < 0)
++ errx(1, "No wireless interface found!");
+ #else
+ wfi.ifnum = 0;
+ #endif
+@@ -146,14 +148,16 @@
+ break;
+ case Button2:
+ #ifdef __FreeBSD__
+- wfi.ifnum = get_wlaniface(wfi.ifnum, 1);
++ if ((wfi.ifnum = get_wlaniface(wfi.ifnum, 1)) < 0)
++ errx(1, "No wireless interface found!");
+ #else
+ next_if(&wfi);
+ #endif
+ break;
+ case Button3:
+ #ifdef __FreeBSD__
+- wfi.ifnum = get_wlaniface(wfi.ifnum, -1);
++ if ((wfi.ifnum = get_wlaniface(wfi.ifnum, -1)) < 0)
++ errx(1, "No wireless interface found!");
+ #else
+ prev_if(&wfi);
+ #endif