Question

I am writing a driver which depends on the SCSI part of IOKit (I'm on 10.6, but this applies to 10.7 and 10.8 too), and I have the headers linked into my project with the Kernel framework. While I can see the headers for files like IOSCSIBlockCommandsDevice.h, I cannot find the counterpart .cpp files anywhere. I am looking, as they would help me understand how to end a bad state, as I don't know what the software is trying to achieve (a loop of SCSI commands 0x1B, 0x03, 0x00, 0x03 by the way)

I have looked in the 10.6 opensource.apple directory, and even Googled for the filename along with 2009 (the year of the matching header's modification) (the date stamp) and come up blank. It seems all the IOSCSIArchitectureModelFamily files are missing from the Apple website, or at least very well hidden.

Does anyone know where these .cpp files are kept?

Était-ce utile?

La solution

The published versions of the IOSCSIArchitectureModelFamily source code are here. The latest public version is quite old, so it's probably diverged somewhat since then, but should still be somewhat useful - the file you're after is this one.

Apple have been publishing progressively less kernel source code over the years, unfortunately.

Google's site: operator is extremely helpful for finding source code on Apple's site. For example, this search locates the file you're after. It usually won't find the newest version, but the directories are browseable, so you just need to truncate the URL to the package base, e.g. from the first result in the above search:

http://opensource.apple.com/source/IOSCSIArchitectureModelFamily/⁠IOSCSIArchitectureModelFamily-1.1_35/IOSCSIBlockCommands/IOSCSIBlockCommandsDevice.cpp

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top