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)
35 lines
951 B
C
35 lines
951 B
C
--- 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 */
|
|
#if __FreeBSD__
|
|
- 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
|