Subject: switch to two-argument KASSERT?
To: None <tech-kern@netbsd.org>
From: David Young <dyoung@pobox.com>
List: tech-kern
Date: 01/13/2004 23:04:58
In response to a recent commit, several folks tell me that they would
like to see our one-argument KASSERT change to a two-argument KASSERT
similar to FreeBSD's. The second argument is a message that describes
what went wrong. I believe that FreeBSD defines the macro like this,

#define KASSERT(cond, complaint) if (!(cond)) panic complaint

Here is an example from sys/net80211/ieee80211_output.c:

        KASSERT(pktlen <= MCLBYTES, ("802.11 packet too large: %u", pktlen));

Dave

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