* mount.cc (main): Use default system/user flag for cygdrive stuff, too.

(change_cygdrive_prefix): Change MOUNT_AUTO to MOUNT_CYGDRIVE.
* umount.cc (remove_cygdrive_prefix): Ditto.
(main): Use default system/user flag for cygdrive stuff, too.
This commit is contained in:
Christopher Faylor 2002-06-09 04:54:32 +00:00
parent 7ac66bdda0
commit 94cc482c64
3 changed files with 12 additions and 4 deletions

View File

@ -1,3 +1,11 @@
2002-06-09 Christopher Faylor <cgf@redhat.com>
* mount.cc (main): Use default system/user flag for cygdrive stuff,
too.
(change_cygdrive_prefix): Change MOUNT_AUTO to MOUNT_CYGDRIVE.
* umount.cc (remove_cygdrive_prefix): Ditto.
(main): Use default system/user flag for cygdrive stuff, too.
2002-06-08 Christopher Faylor <cgf@redhat.com> 2002-06-08 Christopher Faylor <cgf@redhat.com>
* mount.cc (opts): Remove '-i' option. * mount.cc (opts): Remove '-i' option.

View File

@ -275,7 +275,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); change_cygdrive_prefix (argv[optind], flags | default_flag);
break; break;
case saw_show_cygdrive_prefix: case saw_show_cygdrive_prefix:
if (optind <= argc) if (optind <= argc)
@ -436,7 +436,7 @@ mount_already_exists (const char *posix_path, int flags)
static void static void
change_cygdrive_prefix (const char *new_prefix, int flags) change_cygdrive_prefix (const char *new_prefix, int flags)
{ {
flags |= MOUNT_AUTO; flags |= MOUNT_CYGDRIVE;
if (mount (NULL, new_prefix, flags)) if (mount (NULL, new_prefix, flags))
error (new_prefix); error (new_prefix);

View File

@ -160,7 +160,7 @@ main (int argc, char **argv)
case saw_remove_cygdrive_prefix: case saw_remove_cygdrive_prefix:
if (optind != argc) if (optind != argc)
usage (); usage ();
remove_cygdrive_prefix (flags); remove_cygdrive_prefix (flags | default_flag);
break; break;
case saw_remove_all_system_mounts: case saw_remove_all_system_mounts:
if (optind != argc) if (optind != argc)
@ -244,7 +244,7 @@ remove_all_system_mounts ()
static void static void
remove_cygdrive_prefix (int flags) remove_cygdrive_prefix (int flags)
{ {
int res = cygwin_umount (NULL, flags | MOUNT_AUTO); int res = cygwin_umount (NULL, flags | MOUNT_CYGDRIVE);
if (res) if (res)
error ("remove_cygdrive_prefix"); error ("remove_cygdrive_prefix");
exit (0); exit (0);