Ripped from Fedora --- eject.c Tue Jul 3 00:17:41 2001 +++ eject.c Tue Feb 5 05:50:58 2002 @@ -361,8 +361,11 @@ { int status; - status = ioctl(fd, CDROMEJECT_SW, onOff); - if (status != 0) { + if (onOff) + status = ioctl(fd, CDROM_SET_OPTIONS, CDO_AUTO_EJECT); + else + status = ioctl(fd, CDROM_CLEAR_OPTIONS, CDO_AUTO_EJECT); + if (status < 0) { fprintf(stderr, _("%s: CD-ROM auto-eject command failed: %s\n"), programName, strerror(errno)); exit(1); } --- volname.c Tue Jul 3 00:17:41 2001 +++ volname.c Tue Feb 5 05:29:49 2002 @@ -35,6 +35,7 @@ #include #include +#include #include #include #include