On Feb 7, 2004, at 11:20 PM, Matt Jaffa wrote: Ok those are confusing words when I read them over, let me explain it better: When I say it fails I mean it returns a -1, I check the SYSCTL_STRUC thing I made in my KEXT and CTLFLAG_ANYBODY and CTLFLAG_RW are set so it shouldn't be complaining when I try to write a new value through sysctlbyname On Feb 7, 2004, at 9:45 PM, Matt Jaffa wrote: Sorry, I mean it returns a -1, when i do the one when it just reads it returns a 0 and i get the value from my KEXT, but when I try to do it this way result = sysctlbyname(name, &si, &len, &pass, leng); result = sysctlbyname(name2, &getvalue, &length, &finalvalue, length2); it returns a -1, meaning it couldn't change the value, but I check the SYSCTL_STRUCT i made and it does have CTLFLAG_RW and CTLFLAG_ANYBODY so I don't know why it won't let me change the values in my KEXT % man 3 sysctl [snip] RETURN VALUES Upon successful completion, the value 0 is returned; otherwise the value -1 is returned and the global variable errno is set to indicate the error. Looks like you need to check the value of "errno" to find out what went wrong. cr _______________________________________________ darwin-kernel mailing list | darwin-kernel@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel Do not post admin requests to the list. They will be ignored.