Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 261880
Collapse All | Expand All

(-)file_not_specified_in_diff (-1 / +16 lines)
Line  Link Here
0
-- eject.c
0
++ eject.c
Lines 471-478 Link Here
471
{
471
{
472
	struct timeval time_start, time_stop;
472
	struct timeval time_start, time_stop;
473
	int time_elapsed;
473
	int time_elapsed;
474
	int status;
474
475
475
#ifdef CDROMCLOSETRAY
476
#ifdef CDROMCLOSETRAY
477
	
478
	status = ioctl(fd, CDROM_DRIVE_STATUS); 
479
480
        if (status == CDS_TRAY_OPEN){
481
		CloseTray(fd);
482
		return;
483
	}
484
        else if (status == CDS_NO_DISC || status == CDS_DISC_OK){
485
		if (ioctl(fd, CDROMEJECT, 0) < 0) {
486
        	        perror("ioctl");
487
                	exit(1);
488
	        }
489
		return;
490
	}
476
491
477
	/* Try to open the CDROM tray and measure the time therefor
492
	/* Try to open the CDROM tray and measure the time therefor
478
	 * needed.  In my experience the function needs less than 0.05
493
	 * needed.  In my experience the function needs less than 0.05

Return to bug 261880