Subject: ifconfig error handling
To: None <tech-net@netbsd.org>
From: David Young <dyoung@pobox.com>
List: tech-net
Date: 08/30/2006 17:54:09
I noticed today that ifconfig does not reliably return a non-zero exit
code if it fails to configure an interface as it has been ordered by
the command-line arguments.  For example,

        # ifconfig ath0 chan 156
        ifconfig: SIOCS80211CHANNEL: Invalid argument
        # echo $?
        0

Browsing the source, I do not understand why any number of warn() and
warnx() calls are not err(EXIT_FAILURE,) and errx(EXIT_FAILURE,), instead.
Can somebody explain?  If not, I am going to make the change.

Dave

-- 
David Young             OJC Technologies
dyoung@ojctech.com      Urbana, IL * (217) 278-3933