Package: eject Version: 2.1.5+deb1-4 Tags: patch User: [EMAIL PROTECTED] Usertags: origin-ubuntu ubuntu-patch jaunty
Hello, As reported in https://launchpad.net/bugs/91873, eject -T does not work on Macs, and on some amd64 machines: $ eject -v -T eject: using default device `cdrom' eject: device name is `cdrom' eject: expanded name is `/dev/cdrom' eject: `/dev/cdrom' is a link to `/dev/hda' eject: `/dev/hda' is not mounted eject: `/dev/hda' is not a mount point eject: toggling tray ioctl: Input/output error This is because ioctl(iCDROMEJECT) returns EIO if there's no disk in the drive or the tray is open. This is not an error condition. This patch was applied to Ubuntu a while ago, and was verified to work fine. Unfortunately we did not find an upstream bug tracker to send it to. Thanks for considering, Martin -- Martin Pitt | http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
diff -Nru /tmp/6rrvEn4EMT/eject-2.1.4/eject.c /tmp/Jon9ZzjSLN/eject-2.1.4/eject.c
--- /tmp/6rrvEn4EMT/eject-2.1.4/eject.c 2007-03-12 14:15:26.000000000 +0100
+++ /tmp/Jon9ZzjSLN/eject-2.1.4/eject.c 2007-03-12 14:15:28.000000000 +0100
@@ -552,7 +552,7 @@
gettimeofday(&time_start, NULL);
/* Send the CDROMEJECT command to the device. */
- if (ioctl(fd, CDROMEJECT, 0) < 0) {
+ if (ioctl(fd, CDROMEJECT, 0) < 0 && errno != EIO) {
perror("ioctl");
exit(1);
}
signature.asc
Description: Digital signature

