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>2001-09-04 05:09:39 +0400
committerChristopher Faylor <me@cgf.cx>2001-09-04 05:09:39 +0400
commitf90e39b55e112ba76f304f7e164bd60f25433285 (patch)
tree78c8ed7d69b7e8f32c7dd0e74244d3306a9f5f52 /winsup/utils
parentbee722a5e728dac0e117166d42870103c00ffcbb (diff)
* mount.cc (mount_commands): Don't write /cygdrive/u mount points.
Diffstat (limited to 'winsup/utils')
-rw-r--r--winsup/utils/ChangeLog6
-rw-r--r--winsup/utils/mount.cc31
2 files changed, 22 insertions, 15 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog
index 3fe107182..1ae3d9ade 100644
--- a/winsup/utils/ChangeLog
+++ b/winsup/utils/ChangeLog
@@ -1,5 +1,9 @@
2001-09-03 Michael A Chase <mchase@ix.netcom.com>
+ * mount.cc (mount_commands): Don't write /cygdrive/u mount points.
+
+2001-09-03 Michael A Chase <mchase@ix.netcom.com>
+
* mount.cc (longopts): Add mount-commands to options list.
(usage): Add mount-commands option.
(mount_commands): New function. Write commands to recreate current
@@ -82,7 +86,7 @@ Mon Apr 16 15:08:00 2001 Corinna Vinschen <vinschen@redhat.com>
`print_users'.
2001-04-15 Michael A Chase <mchase@ix.netcom.com>
-
+
* mount.cc (longopts): Add help to options list.
(opts): Add 'h' to options string.
* umount.cc (longopts): Add help to options list.
diff --git a/winsup/utils/mount.cc b/winsup/utils/mount.cc
index 75b45d2bd..31f4aed16 100644
--- a/winsup/utils/mount.cc
+++ b/winsup/utils/mount.cc
@@ -265,20 +265,23 @@ mount_commands (void)
// write mount commands for user and system mount points
while ((p = getmntent (m)) != NULL) {
- 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')
- strcat (opts, " -b");
- else if (p->mnt_opts[0] == 't')
- strcat (opts, " -t");
- if (strstr (p->mnt_opts, ",exec"))
- strcat (opts, " -x");
- while ((c = strchr (p->mnt_fsname, '\\')) != NULL)
- *c = '/';
- printf (format_mnt, opts, p->mnt_fsname, p->mnt_dir);
+ // Only list non-cygdrives
+ if (!strstr (p->mnt_opts, ",noumount")) {
+ 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')
+ strcat (opts, " -b");
+ else if (p->mnt_opts[0] == 't')
+ strcat (opts, " -t");
+ if (strstr (p->mnt_opts, ",exec"))
+ strcat (opts, " -x");
+ while ((c = strchr (p->mnt_fsname, '\\')) != NULL)
+ *c = '/';
+ printf (format_mnt, opts, p->mnt_fsname, p->mnt_dir);
+ }
}
endmntent (m);