ide_drive_t *drive = (ide_drive_t*) cdi->handle; 
ide_drive_t *drive = cdi->handle; 
int ide_cdrom_drive_status (struct cdrom_device_info *cdi, int slot_nr){	ide_drive_t *drive = (ide_drive_t*) cdi->handle;	struct media_event_desc med;	struct request_sense sense;	int stat;	if (slot_nr != CDSL_CURRENT)		return -EINVAL;	stat = cdrom_check_status(drive, &sense);	if (!stat || sense.sense_key == UNIT_ATTENTION)		return CDS_DISC_OK;	if (!cdrom_get_media_event(cdi, &med)) {		if (med.media_present)			return CDS_DISC_OK;		else if (med.door_open)			return CDS_TRAY_OPEN;		else			return CDS_NO_DISC;	}	if (sense.sense_key == NOT_READY && sense.asc == 0x04 && sense.ascq == 0x04)		return CDS_DISC_OK;	/*	 * If not using Mt Fuji extended media tray reports,	 * just return TRAY_OPEN since ATAPI doesn't provide	 * any other way to detect this...	 */	if (sense.sense_key == NOT_READY) {		if (sense.asc == 0x3a) {			if (sense.ascq == 1)				return CDS_NO_DISC;			else if (sense.ascq == 0 || sense.ascq == 2)				return CDS_TRAY_OPEN;		}	}	return CDS_DRIVE_NOT_READY;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/2a91f3e54ff27c6002597f689ba51c5fa657ddbd/ide-cd.c/buggy/drivers/ide/ide-cd.c