sysctlbyname returns 1
sysctlbyname returns 1
- Subject: sysctlbyname returns 1
- From: Geoffrey Schmit <email@hidden>
- Date: Mon, 8 Nov 2004 12:23:46 -0600
The following code, when made from within a kernel extension, results in
the error variable being set to 1 (EPERM?):
int error;
int numberOfCPUs = 0;
size_t numberOfCPUsSize = sizeof( int );
error = sysctlbyname( "hw.ncpu", &numberOfCPUs, &numberOfCPUsSize, NULL
/* new value */, 0 /* new value length */ );
Any ideas? The same code works fine from a user-mode console
application. I'm running Mac OS X 10.3.5.
Thanks!
geoff
--
Geoffrey Schmit
Senior Software Engineer
National Instruments
email@hidden
www.ni.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden