diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-03-14 12:24:34 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-03-14 12:24:34 +0000 |
commit | 792063a7ae92a9aa6e2f0f8aa35e59b3781d2c47 (patch) | |
tree | ab5edbd245bd3c5e3c6d7feba2b5f22d0c1b1785 /sys-apps/eject/files | |
parent | Xfce 4.6 uses xfce-base/xfce4-settings, add it as alternative to RDEPEND. (diff) | |
download | gentoo-2-792063a7ae92a9aa6e2f0f8aa35e59b3781d2c47.tar.gz gentoo-2-792063a7ae92a9aa6e2f0f8aa35e59b3781d2c47.tar.bz2 gentoo-2-792063a7ae92a9aa6e2f0f8aa35e59b3781d2c47.zip |
Cleanup and apply fix from opensuse #261880 by Peter Tworek.
(Portage version: 2.2_rc25/cvs/Linux x86_64)
Diffstat (limited to 'sys-apps/eject/files')
-rw-r--r-- | sys-apps/eject/files/eject-2.1.5-toggle.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/sys-apps/eject/files/eject-2.1.5-toggle.patch b/sys-apps/eject/files/eject-2.1.5-toggle.patch new file mode 100644 index 000000000000..30a96028fbd6 --- /dev/null +++ b/sys-apps/eject/files/eject-2.1.5-toggle.patch @@ -0,0 +1,27 @@ +idea take from opensuse +http://bugs.gentoo.org/261880 + +--- a/eject.c ++++ b/eject.c +@@ -576,6 +576,21 @@ static void ToggleTray(int fd) + + #ifdef CDROMCLOSETRAY + ++ /* Ask the CDROM for info, otherwise fall back to manual */ ++ switch (ioctl(fd, CDROM_DRIVE_STATUS)) { ++ case CDS_TRAY_OPEN: ++ CloseTray(fd); ++ return; ++ ++ case CDS_NO_DISC: ++ case 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 + * seconds if the tray was already open, and at least 1.5 seconds |