Subject: Re: sysctl: How to get softc address in a helper function?
To: TAMURA Kent <kent@NetBSD.org>
From: Andrew Brown <atatat@atatdot.net>
List: tech-kern
Date: 10/27/2004 08:53:21
On Mon, Oct 25, 2004 at 10:39:01PM +0900, TAMURA Kent wrote:
>> note that you don't need to track the mib number of you're not going
>> to handle more than one type of request with the helper, and that you
>> can use sysctl_data to hold the address of the softc.
>
>Right.
>
>If we need multiple items and need no softc-dependent operation,
>we may use strcmp(node->sysctl_name, "...") :-)

true, but use strlcmp() since it is more secure.  you never know when
the kernel may decide to attack itself.  ;-)

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
werdna@squooshy.com       * "information is power -- share the wealth."