Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Dec 2006 09:11:58 +0100
From:      Alexander Leidinger <Alexander@Leidinger.net>
To:        Kevin Sanders <newroswell@gmail.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: KASSERT in kernel module outside src/sys
Message-ID:  <20061213091158.2mp4nnxi8kw0cko0@webmail.leidinger.net>
In-Reply-To: <375baf50612121703o3c9f7edcyaf4a3589ca8050c5@mail.gmail.com>
References:  <375baf50612121430s9576df7ld2526be77b2fa119@mail.gmail.com> <20061212231039.GA4531@britannica.bec.de> <375baf50612121703o3c9f7edcyaf4a3589ca8050c5@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Quoting Kevin Sanders <newroswell@gmail.com> (from Tue, 12 Dec 2006  
17:03:24 -0800):

> On 12/12/06, Joerg Sonnenberger <joerg@britannica.bec.de> wrote:
>> On Tue, Dec 12, 2006 at 02:30:41PM -0800, Kevin Sanders wrote:
>>> I'm trying to use KASSERT in my own kernel module and I can't get it
>>> to assert even with a KASSERT(0, "test panic").  Is there something
>>> else I need to do besides add options INVARIANTS to my kernel config
>>> file.  Any clues would be appreciated.
>>
>> Tried
>> CFLAGS+=        -DINVARIANTS
>> in the Makefile of the module?
>
> Thanks all.  That almost works, I'm getting a syntax error before
> string constant.  I took the easy way and undefined and redefined
> KASSERT to panic when the condition is false for now.

Try:
KASSERT(0, ("string"))

Bye,
Alexander.

-- 
Hold the MAYO & pass the COSMIC AWARENESS ...

http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID = 72077137



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