View | Details | Raw Unified
Collapse All | Expand All

(-) ../eject-2.0.13.old/eject.1 (-7 / +7 lines)
 Lines 34-41    Link Here 
The device corresponding to <name> is ejected. The name can be a
The device corresponding to <name> is ejected. The name can be a
device file or mount point, either a full path or with the leading
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
"/dev", "/media" or "/mnt" omitted. If no name is specified, the 
"cdrom" is used.
default name "cdrom" is used.
There are four different methods of ejecting, depending on whether the
There are four different methods of ejecting, depending on whether the
device is a CD-ROM, SCSI device, removable floppy, or tape. By default
device is a CD-ROM, SCSI device, removable floppy, or tape. By default
 Lines 257-267    Link Here 
the name ends in a trailing slash, it is removed (this is to support
the name ends in a trailing slash, it is removed (this is to support
filenames generated using shell file name completion). If the name
filenames generated using shell file name completion). If the name
starts with '.' or '/', it tries to open it as a device file or mount
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',
point. If that fails, it tries prepending '/dev/', '/media/', '/mnt/', 
\&'/dev/rdsk/', '/dev/dsk/', and finally './' to the name, until a
'/dev/cdroms', '/dev/rdsk/', '/dev/dsk/', and finally './' to the name, 
device file or mount point is found that can be opened. The program
until a device file or mount point is found that can be opened. The 
checks /etc/mtab for mounted devices. If that fails, it also checks
program checks /etc/mtab for mounted devices. If that fails, it also 
/etc/fstab for mount points of currently unmounted devices.
checks /etc/fstab for mount points of currently unmounted devices.
Creating symbolic links such as /dev/cdrom or /dev/zip is recommended
Creating symbolic links such as /dev/cdrom or /dev/zip is recommended
so that
so that
(-) ../eject-2.0.13.old/eject.c (+6 lines)
 Lines 294-299    Link Here 
 *
 *
 * foo (if foo starts with '.' or '/')
 * foo (if foo starts with '.' or '/')
 * /dev/foo
 * /dev/foo
 * /media/foo
 * /mnt/foo
 * /mnt/foo
 * /dev/cdroms/foo
 * /dev/cdroms/foo
 * /dev/cdroms/foo0
 * /dev/cdroms/foo0
 Lines 321-326    Link Here 
	if (FileExists(buf))
	if (FileExists(buf))
		return buf;
		return buf;
	strcpy(buf, "/media/");
	strcat(buf, name);
	if (FileExists(buf))
		return buf;
	strcpy(buf, "/mnt/");
	strcpy(buf, "/mnt/");
	strcat(buf, name);
	strcat(buf, name);
	if (FileExists(buf))
	if (FileExists(buf))