| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
| Hi, darwin driver developers! Since I cannot find any detailed documentation, I'll ask this list. I've got a subclass of IOService in my kernel extension with a method that gets called from a userspace daemon through the IOUserClient mechanism, with IOConnectMethodStructureIStructureO. I'm trying to return one kind of structure when the result is success, another kind of structure when the result is a particular error code, a IOReturn in the user defined range. Unfortunately for me, it looks like when the result of my method is my special error code (I'm guessing anything other than kIOReturnSuccess, the output structure is no copied across the kernel-user boundary to my caller. In fact, my code was surprised to see the output structure length value returned from IOConnectMethodStructureIStructureO equal to the value passed in when my kext code was diligently setting it something smaller in all cases. Is this expected behavior or is it more likely due to a sneaky bug in my kext? If its expected, then fine. It seems like reasonable behavior for the IOUserClient but definitely something that should be documented (hmm, I suppose I should file an enhancement request). So the obvious solution for me is to return success for my error case and have the calling code determine which result is which based on its contents. Bummer though, since this really is an error case to me. Sooner or later we want to address the fact that only a small amounts of data can be returned to userland this way, maybe I can kill two birds with one stone, so to speak. A message on the usb mailing list <http://lists.apple.com/archives/Usb/2003/Feb/msg00055.html> mentions which code to use as an example for passing back more data than will fit in a IOConnectMethod structure parameter. Admittedly I haven't looked at it yet, but while I'm here asking my above question, can anyone tell me if this technique is sure to allow me to pass back data to userland even when the method in my IOService subclass returns a non-success result? Thanks Pierre H. |
_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-drivers mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-drivers/email@hidden This email sent to email@hidden
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
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.