Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Oct 2005 15:20:47 -0700
From:      James Long <stable@museum.rain.com>
To:        freebsd-stable@freebsd.org
Subject:   RFC: proposed patch for /usr/src/usr.sbin/wicontrol/wicontrol.c
Message-ID:  <20051026222047.GA9467@ns.museum.rain.com>

next in thread | raw e-mail | index | archive | help
wicontrol.c defaults to the "wi" interface.  I used to have a
wi device, but it eventually took a dump and I bought a new
ath-based card, which works flawlessly AFAIK, after four months
or so.

But I grow weary of having to specify "-i ath0" every time I
run wicontrol.

Please review the following patch to /usr/src/usr.sbin/wicontrol/wicontrol.c
which modifies wicontrol to look for an environment variable
WI_IFACE and if set, take the interface name from that variable.
If unset, the interface name defaults to "wi0" just as before, 
which hopefully will make this POLA compliant.  Googling for 
"WI_IFACE" I find no indications that this variable name already 
is in use for anything else.

Apologies in advance for the simple diff output patch.

Jim


t21 : 15:13:58 /usr/src/usr.sbin/wicontrol# diff wicontrol.c.orig wicontrol.c
1092c1092,1094
<                       iface = "wi0";
---
>                       if ((iface = getenv("WI_IFACE")) == NULL) {
>                               iface = "wi0";
>                       }




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051026222047.GA9467>