diff options
author | Christopher Faylor <me@cgf.cx> | 2002-06-09 04:48:38 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2002-06-09 04:48:38 +0400 |
commit | a004a5b8fb51f70c4bd6212d7dbbe097dcb6a5a7 (patch) | |
tree | 59b59edd9993373f5744f11822f7739f57dae508 /winsup | |
parent | 60a3d46123998f51c6dffba7d0eddf4b8013fb18 (diff) |
* path.cc: Change MOUNT_AUTO to MOUNT_CYGDRIVE throughout.
* shared_info.h (CURR_MOUNT_MAGIC): Update.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/path.cc | 20 | ||||
-rw-r--r-- | winsup/cygwin/shared_info.h | 2 |
3 files changed, 16 insertions, 11 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index ac01999ca..8e71a5a9e 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,10 @@ 2002-06-08 Christopher Faylor <cgf@redhat.com> + * path.cc: Change MOUNT_AUTO to MOUNT_CYGDRIVE throughout. + * shared_info.h (CURR_MOUNT_MAGIC): Update. + +2002-06-08 Christopher Faylor <cgf@redhat.com> + * external.cc (cygwin_internal): Make v1 mount table access invalid. * path.cc (mount_info::init): Remove had_to_create_mount_areas initialization. (mount_info::from_registry): Remove v1 table import. diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 66d271cb9..f894af4c1 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -1956,15 +1956,15 @@ mount_info::read_cygdrive_info_from_registry () if (r2.get_string (CYGWIN_INFO_CYGDRIVE_PREFIX, cygdrive, sizeof (cygdrive), "")) strcpy (cygdrive, CYGWIN_INFO_CYGDRIVE_DEFAULT_PREFIX); - cygdrive_flags = r2.get_int (CYGWIN_INFO_CYGDRIVE_FLAGS, MOUNT_AUTO); + cygdrive_flags = r2.get_int (CYGWIN_INFO_CYGDRIVE_FLAGS, MOUNT_CYGDRIVE); slashify (cygdrive, cygdrive, 1); cygdrive_len = strlen (cygdrive); } else { - /* Fetch user cygdrive_flags from registry; returns MOUNT_AUTO on + /* Fetch user cygdrive_flags from registry; returns MOUNT_CYGDRIVE on error. */ - cygdrive_flags = r.get_int (CYGWIN_INFO_CYGDRIVE_FLAGS, MOUNT_AUTO); + cygdrive_flags = r.get_int (CYGWIN_INFO_CYGDRIVE_FLAGS, MOUNT_CYGDRIVE); slashify (cygdrive, cygdrive, 1); cygdrive_len = strlen(cygdrive); } @@ -2071,7 +2071,7 @@ mount_info::get_cygdrive_info (char *user, char *system, char* user_flags, /* Get the user flags, if appropriate */ if (res == ERROR_SUCCESS) { - int flags = r.get_int (CYGWIN_INFO_CYGDRIVE_FLAGS, MOUNT_AUTO); + int flags = r.get_int (CYGWIN_INFO_CYGDRIVE_FLAGS, MOUNT_CYGDRIVE); strcpy (user_flags, (flags & MOUNT_BINARY) ? "binmode" : "textmode"); } @@ -2085,7 +2085,7 @@ mount_info::get_cygdrive_info (char *user, char *system, char* user_flags, /* Get the system flags, if appropriate */ if (res2 == ERROR_SUCCESS) { - int flags = r2.get_int (CYGWIN_INFO_CYGDRIVE_FLAGS, MOUNT_AUTO); + int flags = r2.get_int (CYGWIN_INFO_CYGDRIVE_FLAGS, MOUNT_CYGDRIVE); strcpy (system_flags, (flags & MOUNT_BINARY) ? "binmode" : "textmode"); } @@ -2361,7 +2361,7 @@ fillout_mntent (const char *native_path, const char *posix_path, unsigned flags) else if (flags & MOUNT_NOTEXEC) strcat (_reent_winsup ()->mnt_opts, (char *) ",noexec"); - if ((flags & MOUNT_AUTO)) /* cygdrive */ + if ((flags & MOUNT_CYGDRIVE)) /* cygdrive */ strcat (_reent_winsup ()->mnt_opts, (char *) ",noumount"); ret.mnt_opts = _reent_winsup ()->mnt_opts; @@ -2444,9 +2444,9 @@ mount (const char *win32_path, const char *posix_path, unsigned flags) { int res = -1; - if (flags & MOUNT_AUTO) /* normal mount */ + if (flags & MOUNT_CYGDRIVE) /* normal mount */ { - /* When flags include MOUNT_AUTO, take this to mean that + /* When flags include MOUNT_CYGDRIVE, take this to mean that we actually want to change the cygdrive prefix and flags without actually mounting anything. */ res = mount_table->write_cygdrive_info_to_registry (posix_path, flags); @@ -2479,9 +2479,9 @@ cygwin_umount (const char *path, unsigned flags) { int res = -1; - if (flags & MOUNT_AUTO) + if (flags & MOUNT_CYGDRIVE) { - /* When flags include MOUNT_AUTO, take this to mean that we actually want + /* When flags include MOUNT_CYGDRIVE, take this to mean that we actually want to remove the cygdrive prefix and flags without actually unmounting anything. */ res = mount_table->remove_cygdrive_info_from_registry (path, flags); diff --git a/winsup/cygwin/shared_info.h b/winsup/cygwin/shared_info.h index 2bada8781..02a12fff5 100644 --- a/winsup/cygwin/shared_info.h +++ b/winsup/cygwin/shared_info.h @@ -41,7 +41,7 @@ class mount_item #define MOUNT_VERSION 27 // increment when mount table changes and #define MOUNT_VERSION_MAGIC CYGWIN_VERSION_MAGIC (MOUNT_MAGIC, MOUNT_VERSION) -#define CURR_MOUNT_MAGIC 0x41e0 +#define CURR_MOUNT_MAGIC 0xf4e5 #define MOUNT_INFO_CB 16488 class reg_key; |