I had the same kind of question. I wanted to read my entire hard drive. No one here gave me straight answers, because 1. they didn't know what they were talking about or 2. they didn't have time to answer. I went to a Unix site. I found there is a huge knowledgeable community and books for these kinds of questions when it comes to Unix/Linux and Windows. Lot of people on forums that know and are ready to help out. Lots of books availabe, in the next OS section over, but not for Mac. Good luck on your search. It's two hundred bucks an incident for technical support with Apple. Kind of makes one see why not much is developed on the Mac.
Alot of crap to put up for a developer, but still I love my Mac. Here is what I've found so far. There is a Tutorial that is called Hello Kernel.
http://developer.apple.com/document...l/KEXTConcept/KEXTConceptKEXT/hello_kext.html
Read this documentation to get yourself started. It's all there is!

When you come to the error that is in the tutorial, let me know, I had to get past that agravating situation. I sent the error in to Apple a few weeks ago and they still haven't fixed it. Another lesson in how they treat those who are looking into to developing for them. I'm getting used to it. Next time I buy a computer I will remember it.
If you are serious about learning about this, maybe we could actually help each other out. Most people won't go deep enough to find out, because the issue (for some reason) isn't compelling enough for them to learn. But if you really want to know and I want to know, we may get more done. Let me know how the tutorial works out.