Commit 3fb9c330 authored by Frank Lichtenheld's avatar Frank Lichtenheld

Import upstream version 2.1.5

parents
.deps
.in
Makefile
Makefile.in
aclocal.m4
build
config.guess
config.log
config.status
config.sub
configure
depcomp
eject
install-sh
missing
mkinstalldirs
volname
/* .in. Generated from configure.in by autoheader. */
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the `regcomp' function. */
#undef HAVE_REGCOMP
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the `strdup' function. */
#undef HAVE_STRDUP
/* Define to 1 if you have the `strerror' function. */
#undef HAVE_STRERROR
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
#undef HAVE_SYS_WAIT_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */
#undef VERSION
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
Jeff Tranter <tranter@pobox.com>
This diff is collapsed.
/AUTHORS/1.1.1.1/Sun Jul 24 23:19:19 2005//
/COPYING/1.1.1.1/Sun Jul 24 23:19:20 2005//
/INSTALL/1.1.1.1/Sun Jul 24 23:19:19 2005//
/Makefile.am/1.3/Wed Sep 28 02:49:48 2005//
/PORTING/1.1.1.1/Sun Jul 24 23:19:19 2005//
/PROBLEMS/1.1.1.1/Sun Jul 24 23:19:19 2005//
/README/1.1.1.1/Sun Jul 24 23:19:19 2005//
/TODO/1.1.1.1/Sun Jul 24 23:19:19 2005//
/bootstrap/1.2/Sun Dec 25 01:53:51 2005//
/eject.1/1.5/Sun Dec 11 00:21:06 2005//
/eject.c/1.8/Sat Feb 11 01:54:38 2006//
/i18n.h/1.3/Tue Sep 27 23:31:02 2005//
/volname.1/1.1.1.1/Sun Jul 24 23:19:20 2005//
/volname.c/1.2/Thu Aug 25 01:17:51 2005//
D/debian////
D/po////
/.cvsignore/1.3/Sun Jun 4 02:06:10 2006//
/ChangeLog/1.6/Sun Jun 4 01:56:42 2006//
/NEWS/1.6/Sun Jun 4 01:58:52 2006//
/configure.in/1.8/Sun Jun 4 01:58:18 2006//
/eject-2.1.5.lsm/1.1/Sun Jun 4 02:01:49 2006//
/eject-2.1.5.spec/1.1/Sun Jun 4 02:01:53 2006//
eject/eject
:ext:tranter@eject.cvs.sourceforge.net:/cvsroot/eject
2006-06-03 Jeff Tranter <tranter@pobox.com>
* Version 2.1.5
* bug fix to -T option
* added Czech translation
* added Brazilian Portuguese translation
* updated Turkish Translation
2005-12-10 Jeff Tranter <tranter@pobox.com>
* Version 2.1.4
* Incorporates Debian patches from Frank Lichtenheld.
2005-10-01 Jeff Tranter <tranter@pobox.com>
* Version 2.1.3
* Incorporates several Gentoo patches from Mike Frysinger
2005-08-24 Jeff Tranter <tranter@pobox.com>
* Version 2.1.2
* Incorporates several Red Hat patches from Than Ngo
2005-08-23 Jeff Tranter <tranter@pobox.com>
* Version 2.1.1
* Incorporates Debian patch for deprecated SCSO ioctl error bug
2005-05-01 Jeff Tranter <tranter@pobox.com>
* Version 2.1.0
* Incorporates Debian patches including a new -m option
2002-12-09 Jeff Tranter <tranter@pobox.com>
* Version 2.0.13 released
* Fixed a symlink security vulnerability reported by SuSE
* Fixed security issue in error message
* Fix to PREFIX in po/Makefile from Pawel Golaszewski
* Better French translations from Yoni Girard
* Better German translations from Nordi
* Updated with Debian maintainers patches
2001-10-01 Jeff Tranter <tranter@pobox.com>
* Version 2.0.12 released
* modify Makefile.am so po files are included in package
2001-09-17 Jeff Tranter <tranter@pobox.com>
* Version 2.0.11 released
* add .po file for Japanese, thanks to TAKEDA Hirofumi
<takepin@turbolinux.co.jp>
* updated .po file for French, thanks to Warly
<warly@mandrakesoft.com> and Christophe Combelles
<combech@gemse.fr>
2001-07-01 Jeff Tranter <tranter@pobox.com>
* Version 2.0.10 released
* updated .spec file (thanks to Volker Moell <volker@die-moells.de>)
* localization support with Taiwanese translation (thanks to
Kun-Chung Hsieh)
* French po file by me (in broken French)
2001-05-22 Jeff Tranter <tranter@pobox.com>
* Version 2.0.9 released
* add new --proc/-p option to use /proc/mounts instead of
/etc/mstab (thanks to Stanislav Ievlev <inger@altlinux.ru>)
2001-05-18 Jeff Tranter <tranter@pobox.com>
* Version 2.0.8 released
* --cdspeed/-x option added to set CD-ROM speed (thanks to
Nobuyuki Tsuchimura <tutimura@nn.iij4u.or.jp>)
2001-05-15 Jeff Tranter <tranter@pobox.com>
* Version 2.0.7 released
* checks for mounted devices with same device numbers (patch from
Vladimir Nadvornik <nadvornik@suse.cz>)
* cleanup of some comments
* use indent level of 4 rather than 2
* volname now uses DEFAULTDEVICE rather than being hardcoded to
use /dev/cdrom
2001-05-05 Jeff Tranter <tranter@pobox.com>
* Version 2.0.6 released
* now uses GNU automake/autoconf
2001-05-02 Jeff Tranter <tranter@pobox.com>
* Version 2.0.5 released
* fixed possible buffer overrun (thanks to Nico Schottelius for noticing this)
2001-04-25 Jeff Tranter <tranter@pobox.com>
* Version 2.0.4 released
* fixed man page formatting error (Debian bug #90283)
* added limit when following symlinks (Debian bug #80596)
* add --version/-V option to display version
* updated debian directory from Debian maintainer
* added note on why volname is not installed
* updated Makefile for package building
* install is now more FHS compliant
2001-04-19 Jeff Tranter <tranter@pobox.com>
* Version 2.0.3 released
* incorporated Debian packager's patches
* added volname program
* ignore comments in /etc/fstab
* partial support for devfs (/dev/cdroms)
* force kernel to re-read partition table when new media inserted
* handle symlinks that are not canonical
* #include changes for recent (2.4.x) kernels
* former sunsite archive site is now ibiblio.org
1999-02-14 Jeff Tranter <tranter@pobox.com>
* Version 2.0.2 released
* eject.c: under 2.1/2.2 kernels CDROM_SELECT_DISC returns the
slot number, so the check for error should be for a return value
less than 0; added parenthesis to suppress an egcs compile
warning; these changes thanks to Richard Simpson
<rs@rcsimpson.demon.co.ukdump.demon.co.uk>
* Makefile: add rule for 'ci' (RCS checkin)
1999-02-08 Jeff Tranter <tranter@pobox.com>
* Version 2.0.1 released
* -c option did not allow value of 0, fix submitted by Dariusz
Kowalewski
1999-01-21 Jeff Tranter <tranter@pobox.com>
* Version 2.0 released
* Changelog: changed to use standard GNU changelog format
* Makefile: added RPM_OPT_FLAGS to Makefile
* README: mentioned related tools
* TODO: possibly add ziptool functionality in future
* eject.1: show -n option in synopsis
* eject.c: show -n option in usage
* eject.c: -n option should not say "device to be *ejected*",
because another option, such as tray close, may have been
selected
* eject.1: added description of what examples do
* eject.1: documented return codes
1999-01-10 Jeff Tranter <tranter@pobox.com>
* Version 2.0beta4 released
* Makefile: uses variables to make it easier to modify
* Makefile: separate CFLAGS and CPPFLAGS
* Makefile: added -I/usr/src/linux for systems that do not have
/usr/include/scsi linked to /usr/src/linux/include/scsi
* Makefile: can set default device in Makefile
* eject.1: clarified some statements
* eject.c: now checks for devices in /dev/rdsk and /dev/dsk for
systems that use devfs such as Solaris and probably Linux in future
* eject.c: moved up processing of -d option to earlier in main()
* eject.c: added -n option
* eject.c: use of getopt_long is now conditional
* eject.c: if device is not mounted according to /proc/mounts, now
also checks /etc/fstab to see if it is a potential mount point
* eject.c: only check /etc/mtab because /proc/mounts shows names
of devices without following symlinks (too bad, because /proc/mounts
is faster)
* provided RPM spec file for building a Red Hat package (thanks
to Jochen A. Stein)
1999-01-05 Jeff Tranter <tranter@pobox.com>
* Version 2.0beta3 released
* eject.c: now tries to unmount all partitions of a multi-partition
device
* eject.c: a couple of internal functions were made static
* eject.c: -q option was omitted from usage dsplay
* eject.1: added examples to man page
* INSTALL: added list of possible problems
1999-01-03 Jeff Tranter <tranter@pobox.com>
* Version 2.0beta2 released
* eject.c: strip any trailing slash from name in case user used
bash/tcsh style filename completion (suggested by Tobias Richter)
* eject.c: new -q option for ejecting using magnetic tape ioctl
* eject.c: made status messages less technical (use English rather
than ioctl names)
* eject.c: set effective user ID to user ID before execl
* eject.c: quit if umount fails
1999-01-01 Jeff Tranter <tranter@pobox.com>
* Version 2.0beta1 released
* eject.c: almost completely an entire rewrite
* eject.c: no longer uses old nickname scheme, uses heuristics to
find device instead
* eject.c: no longer uses CDROM environment variable (could be added,
but did anyone actually use it?)
* eject.c: supports naming mount points
* eject.c: does not attempt to check for specific SCSI devices
* eject.c: support for tray close command added
* eject.c: always tries to unmount mounted devices
* eject.c: alternate long option names
1997-01-05 Jeff Tranter <tranter@pobox.com>
* Version 1.5 released
* changes submitted by Donnie Barnes (djb@redhat.com):
* supports Zip and Jaz drives
* can now unmount multiple partitions
* no longer need -f option in order for -u option to work
* uses new CDROM_SELECT_DISC ioctl in favour of CDROMLOADFROMSLOT
1996-09-08 Jeff Tranter <tranter@pobox.com>
* Version 1.4 released
* changes submitted by Donnie Barnes (djb@redhat.com):
* support for ejecting floppy drives under Linux on the Sun/SPARC
platform
* minor formatting and code changes
* new author's e-mail address
* added a few more nicknames
199?-??-?? Jeff Tranter <tranter@pobox.com>
* Version 1.3 released
* changes submitted by Ben Galliart (bgallia@luc.edu):
* added support for IDE/ATAPI CD-ROM changers using
CDROMLOADFROMSLOT ioctl call
* additional changes made at the suggestion of Markus Pilzecker
(markus.pilzecker@rhein-neckar.netsurf.de)
199?-??-?? Jeff Tranter <tranter@pobox.com>
* Version 1.2 released
* changes submitted by Doug L. Hoffman (hoffman@cs.unc.edu):
* fixes non null-terminated string bug
* uses system() to call umount(8) instead of umount system call
199?-??-?? Jeff Tranter <tranter@pobox.com>
* Version 1.1 released
* now handles case where device is a relative symbolic link
* looks at $CDROM environment variable for default device
* updated man page to reflect $CDROM environment variable
* added more device nicknames
* install using "install" instead of "cp" in Makefile
* handles old kernels without CDROMEJECT_SW support
* now includes file COPYING in distribution
* thanks to Dick Streefland and Mark Lord for suggestions/patches
199?-??-?? Jeff Tranter <tranter@pobox.com>
* Version 1.0 released
* first release
Basic Installation
==================
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, a file
`config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.
The file `configure.in' is used to create `configure' by a program
called `autoconf'. You only need `configure.in' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes a while. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
this:
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not supports the `VPATH'
variable, you have to compile the package for one architecture at a time
in the source code directory. After you have installed the package for
one architecture, use `make distclean' before reconfiguring for another
architecture.
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/kde/bin', `/usr/local/kde/lib', etc. You can specify an
installation prefix other than `/usr/local/kde' by giving `configure'
the option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it can not guess the host type, give it the
`--host=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
CPU-COMPANY-SYSTEM
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the host type.
If you are building compiler tools for cross-compiling, you can also
use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of
system on which you are compiling the package.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Operation Controls
==================
`configure' recognizes the following options to control how it
operates.
`--cache-file=FILE'
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.
`--help'
Print a summary of the options to `configure', and exit.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made.
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--version'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`configure' also accepts some other, not widely useful, options.
bin_PROGRAMS = eject volname
eject_SOURCES = eject.c
volname_SOURCES = volname.c
if USE_NLS
SUBDIRS = po
endif
AM_CPPFLAGS = -DDEFAULTDEVICE=\"$(DEFAULTDEVICE)\" -DGETOPTLONG
AM_CFLAGS = -Wall $(RPM_OPT_FLAGS)
man_MANS = eject.1 volname.1
EXTRA_DIST = $(man_MANS) PORTING PROBLEMS bootstrap eject-$(VERSION).lsm eject-$(VERSION).spec debian/changelog debian/control debian/copyright debian/dirs debian/files debian/rules debian/substvars po/*.pot po/*.po po/Makefile i18n.h
This diff is collapsed.
Version 2.1.5 fixes a bug in the -T option and adds some new translations
Version 2.1.4 incorporates Debian patches from Frank Lichtenheld.
Version 2.1.3 incorporates several Gentoo patches from Mike Frysinger.
Version 2.1.2 incorporates several Red Hat patches from Than Ngo.
Version 2.1.1 incorporates Debian patch for the deprecated SCSO ioctl error.
Version 2.1.0 incorporates Debian patches including a new -m option.
Version 2.0.11 adds localized strings with support for Japanese.
Version 2.0.10 adds localized strings with support for Taiwanese and French.
Version 2.0.9 adds the --proc/-p option.
Version 2.0.8 adds the --cdspeed/-x option.
Version 2.0.6 now uses GNU automake/autoconf.
The methods used to eject are mostly Linux specific. A version for
SunOS or Solaris could likely be done by stripping out much of the
code.
It should compile as is on all Linux platforms. Support for long
option names requires the GNU getopt_long functions. It also needs
the POSIX regex functions, which I would think are included in most
Linux distributions.
Possible Problems
-----------------
Problem: Unable to find <linux/version.h> when compiling.
You need the kernel source installed (at least the include files from
the kernel source).
Problem: Unable to find an include file when compiling
(e.g. <regex.h>).
You are either running a very old kernel, and/or a Linux distribution
which either installs some files in a non-standard location or is
missing some files. I have only tested eject under Red Hat Linux
for Intel.
Problem: Option -c produces "eject: IDE/ATAPI CD-ROM changer not
supported by this kernel".
You are running a very old kernel. If you want multi-disc changer
support upgrade to the 2.0 kernel or later.
Problem: Option -t produces "eject: CD-ROM tray close command not
supported by this kernel".
You are running a very old kernel. If you want multi-disc changer
support upgrade to the 2.0 kernel or later.
Problem: You get an error such as "eject: unable to find or open
device for: `foo'"
1. You did not specify a valid device or file, even after checking
/dev and /mnt.
2. The device is not readable by you. Change the permissions or
install eject setuid root.
3. Some devices (e.g. SCSI) can only be ejected by root. Run as root
or install eject setuid root.
Problem: eject doesn't work and the above solutions are no help.
Send me a description of the problem including the symptoms, what
Linux kernel and distribution you are running, the version of eject,
and the output of eject when the problem occurs, with the -v option.
Notes
-----
What I find is a convenient setup for accessing removable devices is
to use the auto-mounter built in to the kernel to automatically mount
the devices whenever the mount point is referenced. I have this set up
for /mnt/cdrom (IDE CD-ROM), /mnt/zip (IDE ZIP drive), /mnt/floppy
(VFAT-formatted floppy), and /mnt/dos (Windows 95 partition on hard
drive). The automounter also automatically unmounts the devices when
they are idle for a period of time. I set up /etc/fstab so that
non-root users can also unmount the devices at any time. I do not
need to install eject setuid root.
References
----------
See the man pages autofs(8), automount(8), mount(8)
<
Eject allows removable media (typically a CD-ROM, floppy disk, tape
drive, or JAZ or ZIP disk) to be ejected under software control. The
command can also control some multi-disc CD-ROM changers, the
auto-eject feature supported by some devices, and close the disc tray
of some CD-ROM drives.
See the file INSTALL for instructions on how to compile and install
the program.
The following devices and configurations are known to work with eject:
Devices:
- 1GB and 2GB SCSI IOMEGA JAZ drives
- Apple PowerMac floppy drive
- HP1534 SCSI DAT tape drive
- IDE/ATAPI CD-ROM
- IDE/ATAPI IOMEGA 100MB ZIP drive
- IDE/ATAPI LS120 120MB floppy drive
- Parallel port IOMEGA 100MB ZIP drive
- SCSI CD-R drive
- SCSI CD-ROM
- SCSI MO Drive
- Sun SPARC floppy drive
- Fujitsu M2512A magneto-optical disk drive (SCSI)
Kernels:
- 2.0.36 (and earlier 2.0.x)
- 2.1.132 (and earlier 2.1.x)
- 2.2.16 (and earlier 2.2.x)
- 2.4.4 (and earlier 2.4.x)
- 2.6.11 (and earlier 2.6.x)
- with both the IDE, SCSI, and IDE SCSI emulation kernel drivers
Platforms:
- Intel (Red Hat)
- SPARC
- PowerPC
- DEC Alpha
It is loosely based on the SunOS eject command.
If you have any problems or suggestions, drop me a line. I'm
particularly interested in hearing if it does or doesn't work with
media other than CD-ROM or when running Linux on non-Intel machines.
Version 2.0 is mostly a rewrite of version 1.5 to clean up the source
and add a number of new features (and take out some useless ones).
Many thanks to the beta testers for version 2.0:
Andrea Borgia Darius Davis David Wheeler Jochen Stein
Marko Makela Mike Warnecke Steve Linn Tobias Richter
Richard Simpson
You may also find some of the following commands useful for managing
removable media:
gtkzip