+ i_ret = kIOReturnUnsupported;
+ response = kSCSIServiceResponse_SERVICE_DELIVERY_OR_TARGET_FAILURE;
+
+/* HACK! - Make GetSCSITask and friends in /System/Library/Frameworks/Kernel.framework/Versions/A/Headers/IOKit/scsi-commands/IOSCSIPrimaryCommandsDevice.h public by moving public: from line 96 to line 79 (as root). It's only a compile time check - not a link time thing, so it should be ok. */
+ p_request = p_scsi_mcd->GetSCSITask( );
+
+ if ( p_scsi_mcd->READ_DVD_STRUCTURE ( p_request,
+ p_mem,
+ p_data->i_lba,
+ 0,//?LAYER_NUMBER
+ p_data->i_keyformat,
+ p_mem->getLength(),//p_data->i_size ?
+ p_data->i_agid,
+ 0x00 //?CONTROL
+ ) == true )
+ {
+ /* The command was successfully built, now send it */
+ response = p_scsi_mcd->SendCommand( p_request );
+ }
+ else
+ {
+#if 0
+ exit -1;
+ PANIC_NOW(( "IOSCSIMultimediaCommandsDevice:: "
+ "readDVDstruct malformed command" ));
+#endif
+ }
+
+ if( ( response == kSCSIServiceResponse_TASK_COMPLETE ) &&
+ ( p_request->GetTaskStatus ( ) == kSCSITaskStatus_GOOD ) )
+ {
+ i_ret = kIOReturnSuccess;
+ }
+ else
+ {
+ i_ret = kIOReturnError;
+ }
+
+ p_scsi_mcd->ReleaseSCSITask( p_request );
+
+ }
+
+ break;