Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:11.4:Update
eject.import5542
eject-2.1.0-toggle.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File eject-2.1.0-toggle.diff of Package eject.import5542
--- eject.c +++ eject.c @@ -471,8 +471,23 @@ { struct timeval time_start, time_stop; int time_elapsed; + int status; #ifdef CDROMCLOSETRAY + + status = ioctl(fd, CDROM_DRIVE_STATUS); + + if (status == CDS_TRAY_OPEN){ + CloseTray(fd); + return; + } + else if (status == CDS_NO_DISC || status == CDS_DISC_OK){ + if (ioctl(fd, CDROMEJECT, 0) < 0) { + perror("ioctl"); + exit(1); + } + return; + } /* Try to open the CDROM tray and measure the time therefor * needed. In my experience the function needs less than 0.05
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor