View | Details | Raw Unified
Collapse All | Expand All

(-) ../eject-2.0.13.old/eject.1 (+7 lines)
 Lines 123-128    Link Here 
also passes the -n option to umount(1).
also passes the -n option to umount(1).
.TP 0.5i
.TP 0.5i
.B \-m
This option allows eject to work with device drivers which automatically
mount removable media and therefore must be always mount()ed.
The option tells eject to not try to unmount the given device,
even if it is mounted according to /etc/mtab or /proc/mounts.
.TP 0.5i
.B -V
.B -V
This option causes
This option causes
.B eject
.B eject
(-) ../eject-2.0.13.old/eject.c (-5 / +12 lines)
 Lines 84-89    Link Here 
int v_option = 0;
int v_option = 0;
int x_option = 0;
int x_option = 0;
int p_option = 0;
int p_option = 0;
int m_option = 0;
int a_arg = 0;
int a_arg = 0;
int c_arg = 0;
int c_arg = 0;
int x_arg = 0;
int x_arg = 0;
 Lines 128-134    Link Here 
"  -s\t-- eject SCSI device\n"
"  -s\t-- eject SCSI device\n"
"  -f\t-- eject floppy\n"
"  -f\t-- eject floppy\n"
"  -q\t-- eject tape\n"
"  -q\t-- eject tape\n"
"  -p\t-- use /proc/mounts instead of /etc/mtab\n")
"  -p\t-- use /proc/mounts instead of /etc/mtab\n"
"  -m\t-- do not unmount device even if it is mounted\n"
)
, version);
, version);
#ifdef GETOPTLONG
#ifdef GETOPTLONG
	fprintf(stderr,_(
	fprintf(stderr,_(
 Lines 137-143    Link Here 
"  -a --auto   -c --changerslot  -t --trayclose  -x --cdspeed\n"
"  -a --auto   -c --changerslot  -t --trayclose  -x --cdspeed\n"
"  -r --cdrom  -s --scsi	 -f --floppy\n"
"  -r --cdrom  -s --scsi	 -f --floppy\n"
"  -q --tape   -n --noop	 -V --version\n"
"  -q --tape   -n --noop	 -V --version\n"
"  -p --proc\n"));
"  -p --proc   -m --no-unmount\n"));
#endif /* GETOPTLONG */
#endif /* GETOPTLONG */
	fprintf(stderr,_(
	fprintf(stderr,_(
"Parameter <name> can be a device file or a mount point.\n"
"Parameter <name> can be a device file or a mount point.\n"
 Lines 151-157    Link Here 
/* Handle command line options. */
/* Handle command line options. */
static void parse_args(int argc, char **argv, char **device)
static void parse_args(int argc, char **argv, char **device)
{
{
	const char *flags = "a:c:x:dfhnqrstvVp";
	const char *flags = "a:c:x:dfhnqrstvVpm";
#ifdef GETOPTLONG
#ifdef GETOPTLONG
	static struct option long_options[] =
	static struct option long_options[] =
	{
	{
 Lines 169-174    Link Here 
		{"tape",	no_argument,	   NULL, 'q'},
		{"tape",	no_argument,	   NULL, 'q'},
		{"version",	no_argument,	   NULL, 'V'},
		{"version",	no_argument,	   NULL, 'V'},
		{"proc",	no_argument,	   NULL, 'p'},
		{"proc",	no_argument,	   NULL, 'p'},
		{"no-unmount",	no_argument,	   NULL, 'm'},
		{0, 0, 0, 0}
		{0, 0, 0, 0}
	};
	};
	int option_index;
	int option_index;
 Lines 231-236    Link Here 
			  usage();
			  usage();
			  exit(0);
			  exit(0);
			  break;
			  break;
		  case 'm':
			  m_option = 1;
			  break;
		  case 'n':
		  case 'n':
			  n_option = 1;
			  n_option = 1;
			  break;
			  break;
 Lines 933-939    Link Here 
	if (!c_option) HandleXOption(deviceName);
	if (!c_option) HandleXOption(deviceName);
	/* unmount device if mounted */
	/* unmount device if mounted */
	if (mounted) {
	if ((m_option != 1) && mounted) {
		if (v_option)
		if (v_option)
			printf(_("%s: unmounting `%s'\n"), programName, deviceName);
			printf(_("%s: unmounting `%s'\n"), programName, deviceName);
		Unmount(deviceName);
		Unmount(deviceName);
 Lines 942-948    Link Here 
	/* if it is a multipartition device, unmount any other partitions on
	/* if it is a multipartition device, unmount any other partitions on
	   the device */
	   the device */
	pattern = MultiplePartitions(deviceName);
	pattern = MultiplePartitions(deviceName);
	if (pattern != 0)
	if ((m_option != 1) && (pattern != 0))
		UnmountDevices(pattern);
		UnmountDevices(pattern);
	/* handle -c option */
	/* handle -c option */