Hi, I think we should warn() on any error, not just EPERM.
This is more consistent with the rest of the code.
ok ?
Index: ifconfig.c
===================================================================
RCS file: /cvs/src/sbin/ifconfig/ifconfig.c,v
retrieving revision 1.252
diff -d -u -p -b -r1.252 ifconfig.c
--- ifconfig.c 26 Nov 2011 23:38:18 -0000 1.252
+++ ifconfig.c 2 Dec 2011 02:32:48 -0000
@@ -2168,8 +2168,7 @@ ieee80211_listnodes(void)
strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name));
if (ioctl(s, SIOCS80211SCAN, (caddr_t)&ifr) != 0) {
- if (errno == EPERM)
- printf("\t\tno permission to scan\n");
+ warn("SIOCS80211SCAN");
goto done;
}