tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
scanning ...wiconfig: ioctl: No such file or directory
Hi,
There have been a couple of reports about wiconfig -D failing on USB devices
with the error given in the subject. See
http://mail-index.netbsd.org/tech-net/2008/03/17/msg000294.html
The problem is not a failed ioctl call but rather that an already set errno is
caught after the while loop in wi_apscan. Initializing errno before the loop
avoids the problem:
diff -u -r1.42 wiconfig.c
--- wiconfig.c 19 Apr 2009 01:52:09 -0000 1.42
+++ wiconfig.c 20 Jun 2009 00:01:19 -0000
@@ -201,6 +201,7 @@
printf("scanning ...");
fflush(stdout);
+ errno = 0;
while (ioctl(s, SIOCGWAVELAN, &ifr) == -1) {
retries--;
if (retries >= 0) {
Strangly, errno gets set by the printf("scanning...") statement just before
the loop.
Regards,
Sverre
Home |
Main Index |
Thread Index |
Old Index