Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

KUNCExectute and return values



Hi,

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      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.