DriverGestalt - Macintosh Disk Driver Gestalt SampleVersion: 1.0
Apple Macintosh Developer Technical Support
Written by: Vinne MoscaritoloCopyright Apple Computer, Inc
You may incorporate this sample code into your applications without restriction, though the sample code has been provided "AS IS" and the responsibility for its operation is 100% yours. However, what you are not permitted to do is to redistribute the source as "DTS Sample Code" after having made changes. If you're going to re-distribute the source, we require that you make it clear in the source that the code was descended from Apple Sample Code, but that you've made changes.
DriverGestalt is a CodeWarrior 10 C sample that will scan the disk drive queue and perform a DriverGestalt call to the various drivers. It demonstrates how to gather information on such things as the driver version, the device type (disk, tape), the device interface (scsi,atapi,ata), it's boot PRAM value and if it supports drive flushing.
Disk Drive Queue Information: Drive: 7 .ATADisk (-54) 1586822 blocks 'vers' - version: 3.0.3 (hex 03038000) 'devt' - Device: 'disk' 'dAPI' - Interface: 'ata ' 'boot' - Boot PRAM: 00062000 'sync' - Driver is synchronous Drive: 8 .ASYC00 (-34) 8813156 blocks 'vers' - version: 8.0.6 (hex 08068000) 'devt' - Device: 'disk' 'dAPI' - Interface: 'scsi' 'boot' - Boot PRAM: 08000000 'sync' - Driver is asynchronous Drive: 9 .ASYC00 (-33) 8813156 blocks 'vers' - version: 8.0.4 (hex 08048000) 'devt' - Device: 'disk' 'dAPI' - Interface: 'scsi' 'boot' - Boot PRAM: 00000000 'sync' - Driver is asynchronous Drive: 1 .Sony (-5) 0 blocks (small drive)
Comments (vinnie@apple.com)