aboutsummaryrefslogtreecommitdiff
path: root/net/wmwifi/files
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2005-07-13 21:35:27 +0000
committerPav Lucistnik <pav@FreeBSD.org>2005-07-13 21:35:27 +0000
commit4e37af4595848d4dc6af1fa00f5d868c3cd36b24 (patch)
treec0fd2b00a435aee53e800a422e4b646fb3fdddfe /net/wmwifi/files
parent06bdaf1097fdbaa7830aa495b846a6d8cb09eb1a (diff)
downloadports-4e37af4595848d4dc6af1fa00f5d868c3cd36b24.tar.gz
ports-4e37af4595848d4dc6af1fa00f5d868c3cd36b24.zip
Notes
Diffstat (limited to 'net/wmwifi/files')
-rw-r--r--net/wmwifi/files/patch-wireless.c29
-rw-r--r--net/wmwifi/files/patch-wmwifi.c35
2 files changed, 57 insertions, 7 deletions
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