sysctlbyname
sysctlbyname
- Subject: sysctlbyname
- From: Matt Jaffa <email@hidden>
- Date: Sat, 7 Feb 2004 21:05:13 -0700
Hi,
I have created a sysctl_struct in my KEXT that extends off (a child) of
_kern.
I have created these two:
SYSCTL_STRUCT(_kern, OID_AUTO, ttttt, CTLFLAG_RW|CTLFLAG_ANYBODY,
&somo, testingt, "dfdf");
SYSCTL_INT(_kern,OID_AUTO,tttttt,CTLFLAG_RW|CTLFLAG_ANYBODY, &testing,
0, "dfsd");
testing == to a int
testingt, or somo === a struct
Now in my Daemon i am using sysctlbyname to read from those values that
are in the Kernel, inside my KEXT.
It works great, except when i try to set the values by using
sysctlbyname it doesn't work, here is my daemon code: These
two work just fine
result = sysctlbyname(name, &si, &len, NULL, 0);
result = sysctlbyname(name2, &getvalue, &length, NULL, 0);
BUT when I do it like this it fails: when i try to set the values:
result = sysctlbyname(name, &si, &len, &pass, leng);
result = sysctlbyname(name2, &getvalue, &length, &finalvalue,
length2);
Any help would be appreciated,
Thanks,
Matt
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.