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>2003-09-04 05:04:57 +0400
committerChristopher Faylor <me@cgf.cx>2003-09-04 05:04:57 +0400
commite48feef96a8fcb94c7cd81a98286da4ba536cc12 (patch)
tree25b9167c88a7c35aab30b5cd4dfb75acebea0147 /winsup/utils/mount.cc
parente550f4d98057ed1f0a4d9685c29c81dc9370065e (diff)
* mount.cc (mount_commands): Ensure user mode is actually user mode and not the
default system mode.
Diffstat (limited to 'winsup/utils/mount.cc')
-rw-r--r--winsup/utils/mount.cc78
1 files changed, 42 insertions, 36 deletions
diff --git a/winsup/utils/mount.cc b/winsup/utils/mount.cc
index 2a7014986..5c84280f7 100644
--- a/winsup/utils/mount.cc
+++ b/winsup/utils/mount.cc
@@ -406,48 +406,54 @@ mount_commands (void)
char system_flags[MAX_PATH];
// write mount commands for user and system mount points
- while ((p = getmntent (m)) != NULL) {
+ while ((p = getmntent (m)) != NULL)
// 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");
- if (strstr (p->mnt_opts, ",noexec"))
- strcat (opts, " -E");
- while ((c = strchr (p->mnt_fsname, '\\')) != NULL)
- *c = '/';
- printf (format_mnt, opts, p->mnt_fsname, p->mnt_dir);
- }
- }
+ 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");
+ if (strstr (p->mnt_opts, ",noexec"))
+ strcat (opts, " -E");
+ if (strstr (p->mnt_opts, ",managed"))
+ strcat (opts, " -o managed");
+ while ((c = strchr (p->mnt_fsname, '\\')) != NULL)
+ *c = '/';
+ printf (format_mnt, opts, p->mnt_fsname, p->mnt_dir);
+ }
endmntent (m);
// write mount commands for cygdrive prefixes
cygwin_internal (CW_GET_CYGDRIVE_INFO, user, system, user_flags,
system_flags);
- if (strlen (user) > 0) {
- strcpy (opts, " ");
- if (user_flags[0] == 'b')
- strcat (opts, " -b");
- else if (user_flags[0] == 't')
- strcat (opts, " -t");
- printf (format_cyg, opts, user);
- }
- if (strlen (system) > 0) {
- strcpy (opts, " -s");
- if (system_flags[0] == 'b')
- strcat (opts, " -b");
- else if (system_flags[0] == 't')
- strcat (opts, " -t");
- printf (format_cyg, opts, system);
- }
+
+ if (strlen (user) > 0)
+ {
+ strcpy (opts, " -u");
+ if (user_flags[0] == 'b')
+ strcat (opts, " -b");
+ else if (user_flags[0] == 't')
+ strcat (opts, " -t");
+ printf (format_cyg, opts, user);
+ }
+
+ if (strlen (system) > 0)
+ {
+ strcpy (opts, " -s");
+ if (system_flags[0] == 'b')
+ strcat (opts, " -b");
+ else if (system_flags[0] == 't')
+ strcat (opts, " -t");
+ printf (format_cyg, opts, system);
+ }
exit(0);
}