Apple sample code from https://developer.apple.com/library/archive/samplecode/SCSI_Simple_Sample/Introduction/Intro.html#//apple_ref/doc/uid/DTS10000027