site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On Nov 22, 2007, at 1:05 PM, Andrew James wrote: Hi, Brian Bergstrand <http://www.bergstrand.org/brian/> PGP Key ID: 0xB6C7B6A2 _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... I believe the return val of KUNCExecute is whether the execute succeeded or not, not the return value of the binary being executed. So 0 would be correct - no error executing your binary. I also believe Apple has stated the KUNC functions are not the way forward (IOW, they may disappear). Your best solution would be to have a userland program pass this value to your KEXT via a more supported (and efficient) means. There are many ways to achieve this: IOKit UserClient, BSD sockets or ioctl's, and mach ports or shared memory. I am developing a KEXT which requires the power source, now i have done lots of study into finding a way to access the power source information but there seems to be no obvious way for a KEXT to access this data. Then it came to me, why not use a secondary binary which is ever so simple and all it does is return the value of the power source in a error code of the binary (10 for AC etc) However i can not work out how to retrieve the return value all i get is 0 kern_return_t ret; ret = KUNCExecute("/Users/jamesas/Projects/Build/Release/ PowerSource" , kOpenAppAsRoot, kOpenApplicationPath); IOLog ("KUNC: %d", ret); _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/brian%40classicalguitar.ne... This email sent to brian@classicalguitar.net This email sent to site_archiver@lists.apple.com