rem: uint allocation_length = cmd->allocation_length; int transfer_size;
add: uint32 allocation_length = cmd->allocation_length; uint32 transfer_size;
context: static void ata_inquiry( ide_device_info *device, ide_qrequest *qrequest ){	scsi_ccb *request = qrequest->request;	scsi_res_inquiry data;	scsi_cmd_inquiry *cmd = (scsi_cmd_inquiry *)request->cdb;	uint allocation_length = cmd->allocation_length;	int transfer_size;		if (cmd->EVPD || cmd->page_code) {		set_sense(device, SCSIS_KEY_ILLEGAL_REQUEST, SCSIS_ASC_INV_CDB_FIELD);		return;	}	memset( &data, 0, sizeof( data ));		data.device_type = scsi_dev_direct_access;	data.device_qualifier = scsi_periph_qual_connected;		data.device_type_modifier = 0;	data.RMB = false;		data.ANSI_version = 2;	data.ECMA_version = 0;	data.ISO_version = 0;		data.response_data_format = 2;	data.TrmIOP = false;		// to be changed if we support TERM I/O	data.additional_length = sizeof( scsi_res_inquiry ) - 4;		data.SftRe = false;	data.CmdQue = device->queue_depth > 1;	data.Linked = false;		// these values are free-style	data.Sync = false;	data.WBus16 = true;	data.WBus32 = false;		data.RelAdr = false;		// the following fields are *much* to small, sigh...	memcpy( data.vendor_ident, device->infoblock.model_number, 		sizeof( data.vendor_ident ));	memcpy( data.product_ident, device->infoblock.model_number + 8, 		sizeof( data.product_ident ));	memcpy( data.product_rev, "    ", sizeof( data.product_rev ));		copy_sg_data( request, 0, allocation_length, &data, sizeof( data ), false );		transfer_size = min( sizeof( data ), allocation_length );	transfer_size = min( transfer_size, request->data_len );		request->data_resid = request->data_len - transfer_size;}