Checking sysctl values from within the kernel.

Thordur I. Bjornsson thib at mi.is
Fri Aug 5 00:55:12 GMT 2005


Hello list.

If I want to check a sysctl value from within the kernel (e.g. an KLD),
should I use the system calls described in sysctl(3) ?

If not, what is the propper way to do so ?

And if it is and I want to do error checking e.g:

if((sysctl(name, namelen, &val, NULL, 0)) != 0) {
	"Error in call to sysctl(3) blah blah blah";
}

What would be the correct way to report,stop, &c ?
This is propaply depentand on what I'm doing so...

If this is A&A I'm sorry for the noize, I have not been able to find
anything on google/archives. (It's late ;)

-- 
Thordur I.	<bzthib at gmail.com>
Humppa!


More information about the freebsd-hackers mailing list