* mount.cc (usage): Mark -s and -u as ignored.

(print_version): Simplify printing copyright dates.
	(main): Remove default_flag.  Dont set flags on -s and -u options.
	(mount_commands): Drop handling -s and -u options.
This commit is contained in:
Corinna Vinschen 2008-04-23 11:37:58 +00:00
parent 4056e97a45
commit f7483b41e0
2 changed files with 15 additions and 15 deletions

View File

@ -1,3 +1,10 @@
2008-03-23 Corinna Vinschen <corinna@vinschen.de>
* mount.cc (usage): Mark -s and -u as ignored.
(print_version): Simplify printing copyright dates.
(main): Remove default_flag. Dont set flags on -s and -u options.
(mount_commands): Drop handling -s and -u options.
2008-03-22 Corinna Vinschen <corinna@vinschen.de> 2008-03-22 Corinna Vinschen <corinna@vinschen.de>
* cygcheck.cc (dump_sysinfo): Fix multiple Cygwin DLL test. * cygcheck.cc (dump_sysinfo): Fix multiple Cygwin DLL test.

View File

@ -1,6 +1,7 @@
/* mount.cc /* mount.cc
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005 Red Hat, Inc. Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005,
2008 Red Hat, Inc.
This file is part of Cygwin. This file is part of Cygwin.
@ -164,9 +165,9 @@ Display information about mounted filesystems, or mount a filesystem\n\
system mount points and cygdrive prefixes\n\ system mount points and cygdrive prefixes\n\
-o, --options X[,X...] specify mount options\n\ -o, --options X[,X...] specify mount options\n\
-p, --show-cygdrive-prefix show user and/or system cygdrive path prefix\n\ -p, --show-cygdrive-prefix show user and/or system cygdrive path prefix\n\
-s, --system (default) add system-wide mount point\n\ -s, --system (ignored)\n\
-t, --text text files get \\r\\n line endings\n\ -t, --text text files get \\r\\n line endings\n\
-u, --user add user-only mount point\n\ -u, --user (ignored)\n\
-v, --version output version information and exit\n\ -v, --version output version information and exit\n\
-x, --executable treat all files under mount point as executables\n\ -x, --executable treat all files under mount point as executables\n\
-E, --no-executable treat all files under mount point as \n\ -E, --no-executable treat all files under mount point as \n\
@ -213,7 +214,7 @@ print_version ()
printf ("\ printf ("\
%s (cygwin) %.*s\n\ %s (cygwin) %.*s\n\
Filesystem Utility\n\ Filesystem Utility\n\
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.\n\ Copyright 1996-2008 Red Hat, Inc.\n\
Compiled on %s\n\ Compiled on %s\n\
", progname, len, v, __DATE__); ", progname, len, v, __DATE__);
} }
@ -231,7 +232,6 @@ main (int argc, char **argv)
{ {
int i; int i;
int flags = MOUNT_BINARY; int flags = MOUNT_BINARY;
int default_flag = MOUNT_SYSTEM;
char *options = strdup (""); char *options = strdup ("");
enum do_what enum do_what
{ {
@ -292,14 +292,11 @@ main (int argc, char **argv)
usage (); usage ();
break; break;
case 's': case 's':
flags |= MOUNT_SYSTEM;
break; break;
case 't': case 't':
flags &= ~MOUNT_BINARY; flags &= ~MOUNT_BINARY;
break; break;
case 'u': case 'u':
flags &= ~MOUNT_SYSTEM;
default_flag = 0;
break; break;
case 'v': case 'v':
print_version (); print_version ();
@ -356,7 +353,7 @@ main (int argc, char **argv)
case saw_change_cygdrive_prefix: case saw_change_cygdrive_prefix:
if (optind != argc) if (optind != argc)
usage (); usage ();
change_cygdrive_prefix (argv[optind], flags | default_flag); change_cygdrive_prefix (argv[optind], flags);
break; break;
case saw_show_cygdrive_prefix: case saw_show_cygdrive_prefix:
if (optind <= argc) if (optind <= argc)
@ -377,8 +374,8 @@ main (int argc, char **argv)
fprintf (stderr, "%s: too many arguments\n", progname); fprintf (stderr, "%s: too many arguments\n", progname);
usage (); usage ();
} }
if (force || !mount_already_exists (argv[optind + 1], flags | default_flag)) if (force || !mount_already_exists (argv[optind + 1], flags))
do_mount (argv[optind], argv[optind + 1], flags | default_flag); do_mount (argv[optind], argv[optind + 1], flags);
else else
{ {
errno = EBUSY; errno = EBUSY;
@ -410,10 +407,6 @@ mount_commands (void)
if (!strstr (p->mnt_opts, ",noumount")) if (!strstr (p->mnt_opts, ",noumount"))
{ {
strcpy(opts, " -f"); strcpy(opts, " -f");
if (p->mnt_type[0] == 'u')
strcat (opts, " -u");
else if (p->mnt_type[0] == 's')
strcat (opts, " -s");
if (p->mnt_opts[0] == 'b') if (p->mnt_opts[0] == 'b')
strcat (opts, " -b"); strcat (opts, " -b");
else if (p->mnt_opts[0] == 't') else if (p->mnt_opts[0] == 't')