diff -Nru ../eject-2.0.13.old/eject.1 ./eject.1 --- ../eject-2.0.13.old/eject.1 2001-05-22 11:51:09.000000000 -0400 +++ ./eject.1 2005-05-09 00:33:59.000000000 -0400 @@ -34,8 +34,8 @@ The device corresponding to is ejected. The name can be a device file or mount point, either a full path or with the leading -"/dev" or "/mnt" omitted. If no name is specified, the default name -"cdrom" is used. +"/dev", "/media" or "/mnt" omitted. If no name is specified, the +default name "cdrom" is used. There are four different methods of ejecting, depending on whether the device is a CD-ROM, SCSI device, removable floppy, or tape. By default @@ -257,11 +257,11 @@ the name ends in a trailing slash, it is removed (this is to support filenames generated using shell file name completion). If the name starts with '.' or '/', it tries to open it as a device file or mount -point. If that fails, it tries prepending '/dev/', '/mnt/', '/dev/cdroms', -\&'/dev/rdsk/', '/dev/dsk/', and finally './' to the name, until a -device file or mount point is found that can be opened. The program -checks /etc/mtab for mounted devices. If that fails, it also checks -/etc/fstab for mount points of currently unmounted devices. +point. If that fails, it tries prepending '/dev/', '/media/', '/mnt/', +'/dev/cdroms', '/dev/rdsk/', '/dev/dsk/', and finally './' to the name, +until a device file or mount point is found that can be opened. The +program checks /etc/mtab for mounted devices. If that fails, it also +checks /etc/fstab for mount points of currently unmounted devices. Creating symbolic links such as /dev/cdrom or /dev/zip is recommended so that diff -Nru ../eject-2.0.13.old/eject.c ./eject.c --- ../eject-2.0.13.old/eject.c 2002-12-09 17:28:08.000000000 -0500 +++ ./eject.c 2005-05-09 00:40:33.000000000 -0400 @@ -294,6 +294,7 @@ * * foo (if foo starts with '.' or '/') * /dev/foo + * /media/foo * /mnt/foo * /dev/cdroms/foo * /dev/cdroms/foo0 @@ -321,6 +322,11 @@ if (FileExists(buf)) return buf; + strcpy(buf, "/media/"); + strcat(buf, name); + if (FileExists(buf)) + return buf; + strcpy(buf, "/mnt/"); strcat(buf, name); if (FileExists(buf))