Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-05-12 08:29:54 +0400
committerChristopher Faylor <me@cgf.cx>2002-05-12 08:29:54 +0400
commit48897dfeb90a2c09949c7e9679c3edfbe92a5eec (patch)
treef1bab3890cf0407c2934191939d7ea017c9bd670 /winsup/utils/umount.cc
parent29ee580d07d537ec3f57c7ba1f95488513a81eff (diff)
* mount.cc (do_mount): Default to non-exec option for remote drives. Report
warnings before attempting a mount. (longopts): Add no-executable option. (mount_commands): Ditto. (opts): Ditto. (usage): Ditto. Indicate that system mount is now the default. (main): Accommodate no-executable option. Make system mount the default. * umount.cc (usage): Indicate that system umount is now the default. (main): Make system umount the default.
Diffstat (limited to 'winsup/utils/umount.cc')
-rw-r--r--winsup/utils/umount.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/winsup/utils/umount.cc b/winsup/utils/umount.cc
index cff08c70a..459134dc0 100644
--- a/winsup/utils/umount.cc
+++ b/winsup/utils/umount.cc
@@ -43,7 +43,7 @@ usage (void)
fprintf (stderr, "Usage %s [OPTION] [<posixpath>]\n\
-A, --remove-all-mounts remove all mounts\n\
-c, --remove-cygdrive-prefix remove cygdrive prefix\n\
- -s, --system remove system mount\n\
+ -s, --system remove system mount (default)\n\
-S, --remove-system-mounts remove all system mounts\n\
-u, --user remove user mount\n\
-U, --remove-user-mounts remove all user mounts\n\
@@ -63,6 +63,7 @@ main (int argc, char **argv)
{
int i;
int flags = 0;
+ int default_flag = MOUNT_SYSTEM;
progname = argv[0];
enum do_what
{
@@ -99,6 +100,7 @@ main (int argc, char **argv)
break;
case 'u':
flags &= ~MOUNT_SYSTEM;
+ default_flag = 0;
break;
case 'U':
if (do_what != nada)
@@ -134,7 +136,7 @@ main (int argc, char **argv)
default:
if (optind != argc - 1)
usage ();
- if (cygwin_umount (argv[optind], flags) != 0)
+ if (cygwin_umount (argv[optind], flags | default_flag) != 0)
error (argv[optind]);
}