Fail early and exit non-zero immediately instead of indicating success and
possibly carrying the next ifconfig command.
Found at install when wifi interfaces are reset with "-nwid -nwkey -wpa":
Which network interface do you wish to configure? (or 'done') [bse0] bwfm0
ifconfig: SIOCS80211NWKEY: Operation not supported by device
Access point? (ESSID, 'any', list# or '?') [any] 2
Security protocol? (O)pen, (W)EP, WPA-(P)SK [O]
bwfm(4) currently does not support WEP.
OK stsp
-/* $OpenBSD: ifconfig.c,v 1.445 2021/10/06 06:14:08 florian Exp $ */
+/* $OpenBSD: ifconfig.c,v 1.446 2021/11/02 23:36:43 kn Exp $ */
/* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */
/*
}
if (ioctl(sock, SIOCS80211NWKEY, (caddr_t)&nwkey) == -1)
- warn("SIOCS80211NWKEY");
+ err("SIOCS80211NWKEY");
}
/* ARGSUSED */