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-06-09 04:31:03 +0400
committerChristopher Faylor <me@cgf.cx>2002-06-09 04:31:03 +0400
commit50484e8e36cd2945fbcd11524ce4f24ae5f4d8ba (patch)
treefb69e435482f82047c619069aff062a55e47105d
parent2e2dcba320d3159bc4f8fd66c7449ae73352404e (diff)
* 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. (mount_info::read_v1_mounts): Eliminate. (mount_info::import_v1_mounts): Ditto. * shared_info.h (mount_info): Ditto for both of above. * sys/mount.h (MOUNT_DEVFS): New enum. (MOUNT_PROC): Ditto.
-rw-r--r--winsup/cygwin/ChangeLog11
-rw-r--r--winsup/cygwin/external.cc5
-rw-r--r--winsup/cygwin/include/sys/mount.h6
-rw-r--r--winsup/cygwin/path.cc81
-rw-r--r--winsup/cygwin/shared_info.h3
5 files changed, 17 insertions, 89 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 893bbb33b..ac01999ca 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,16 @@
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.
+ (mount_info::read_v1_mounts): Eliminate.
+ (mount_info::import_v1_mounts): Ditto.
+ * shared_info.h (mount_info): Ditto for both of above.
+ * sys/mount.h (MOUNT_DEVFS): New enum.
+ (MOUNT_PROC): Ditto.
+
+2002-06-08 Christopher Faylor <cgf@redhat.com>
+
* include/wchar.h: Define __need_size_t.
2002-06-07 Christopher Faylor <cgf@redhat.com>
diff --git a/winsup/cygwin/external.cc b/winsup/cygwin/external.cc
index 7959d3999..bc61027a0 100644
--- a/winsup/cygwin/external.cc
+++ b/winsup/cygwin/external.cc
@@ -161,9 +161,8 @@ cygwin_internal (cygwin_getinfo_types t, ...)
return (DWORD) cygwin_version_strings;
case CW_READ_V1_MOUNT_TABLES:
- /* Upgrade old v1 registry mounts to new location. */
- mount_table->import_v1_mounts ();
- return 0;
+ set_errno (ENOSYS);
+ return 1;
case CW_USER_DATA:
return (DWORD) &__cygwin_user_data;
diff --git a/winsup/cygwin/include/sys/mount.h b/winsup/cygwin/include/sys/mount.h
index a7ae25cd8..26e02cba2 100644
--- a/winsup/cygwin/include/sys/mount.h
+++ b/winsup/cygwin/include/sys/mount.h
@@ -21,12 +21,14 @@ enum
MOUNT_BINARY = 0x002, /* "binary" format read/writes */
MOUNT_SYSTEM = 0x008, /* mount point came from system table */
MOUNT_EXEC = 0x010, /* Any file in the mounted directory gets 'x' bit */
- MOUNT_AUTO = 0x020, /* mount point refers to auto device mount */
+ MOUNT_CYGDRIVE = 0x020, /* mount point refers to cygdriv device mount */
MOUNT_CYGWIN_EXEC = 0x040, /* file or directory is or contains a cygwin
executable */
MOUNT_MIXED = 0x080, /* reads are text, writes are binary
not yet implemented */
- MOUNT_NOTEXEC = 0x100 /* don't check files for executable magic */
+ MOUNT_NOTEXEC = 0x100, /* don't check files for executable magic */
+ MOUNT_DEVFS = 0x200, /* /device "filesystem" */
+ MOUNT_PROC = 0x400 /* /proc "filesystem" */
};
int mount (const char *, const char *, unsigned __flags);
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 336df5e4e..66d271cb9 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -1334,7 +1334,6 @@ void
mount_info::init ()
{
nmounts = 0;
- had_to_create_mount_areas = 0;
/* Fetch the mount table and cygdrive-related information from
the registry. */
@@ -1835,11 +1834,6 @@ mount_info::from_registry ()
CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME,
NULL);
read_mounts (r1);
-
- /* If we had to create both user and system mount areas, import
- old mounts. */
- if (had_to_create_mount_areas == 2)
- import_v1_mounts ();
}
/* add_reg_mount: Add mount item to registry. Return zero on success,
@@ -2315,81 +2309,6 @@ mount_info::del_item (const char *path, unsigned flags, int reg_p)
return -1;
}
-/* read_v1_mounts: Given a reg_key to an old mount table registry area,
- read in the mounts. The "which" arg contains zero if we're reading
- the user area and MOUNT_SYSTEM if we're reading the system area.
- This way we can store the mounts read in the appropriate place when
- they are written back to the new registry layout. */
-
-void
-mount_info::read_v1_mounts (reg_key r, unsigned which)
-{
- unsigned mountflags = 0;
-
- /* MAX_MOUNTS was 30 when we stopped using the v1 layout */
- for (int i = 0; i < 30; i++)
- {
- char key_name[10];
- char win32path[MAX_PATH];
- char unixpath[MAX_PATH];
-
- __small_sprintf (key_name, "%02x", i);
-
- reg_key k (r.get_key (), KEY_ALL_ACCESS, key_name, NULL);
-
- /* The registry names are historical but useful so are left alone. */
- k.get_string ("native", win32path, sizeof (win32path), "");
- k.get_string ("unix", unixpath, sizeof (unixpath), "");
-
- /* Does this entry contain something? */
- if (*win32path != 0)
- {
- mountflags = 0;
-
- if (k.get_int ("fbinary", 0))
- mountflags |= MOUNT_BINARY;
-
- /* Or in zero or MOUNT_SYSTEM depending on which table
- we're reading. */
- mountflags |= which;
-
- int res = mount_table->add_item (win32path, unixpath, mountflags, TRUE);
- if (res && get_errno () == EMFILE)
- break; /* The number of entries exceeds MAX_MOUNTS */
- }
- }
-}
-
-/* import_v1_mounts: If v1 mounts are present, load them and write
- the new entries to the new registry area. */
-
-void
-mount_info::import_v1_mounts ()
-{
- reg_key r (HKEY_CURRENT_USER, KEY_ALL_ACCESS,
- "SOFTWARE",
- "Cygnus Solutions",
- "CYGWIN.DLL setup",
- "b15.0",
- "mounts",
- NULL);
-
- nmounts = 0;
-
- /* First read mounts from user's table. */
- read_v1_mounts (r, 0);
-
- /* Then read mounts from system-wide mount table. */
- reg_key r1 (HKEY_LOCAL_MACHINE, KEY_ALL_ACCESS,
- "SOFTWARE",
- "Cygnus Solutions",
- "CYGWIN.DLL setup",
- "b15.0",
- "mounts",
- NULL);
- read_v1_mounts (r1, MOUNT_SYSTEM);
-}
-
/************************* mount_item class ****************************/
static mntent *
diff --git a/winsup/cygwin/shared_info.h b/winsup/cygwin/shared_info.h
index 16d71eef6..2bada8781 100644
--- a/winsup/cygwin/shared_info.h
+++ b/winsup/cygwin/shared_info.h
@@ -94,13 +94,10 @@ class mount_info
int get_cygdrive_info (char *user, char *system, char* user_flags,
char* system_flags);
- void import_v1_mounts ();
-
private:
void sort ();
void read_mounts (reg_key& r);
- void read_v1_mounts (reg_key r, unsigned which);
void mount_slash ();
void to_registry ();