]> sourceware.org Git - newlib-cygwin.git/commitdiff
* shared_info.h (mount_info): Remove mnt_ elements.
authorChristopher Faylor <me@cgf.cx>
Mon, 2 Apr 2001 04:27:12 +0000 (04:27 +0000)
committerChristopher Faylor <me@cgf.cx>
Mon, 2 Apr 2001 04:27:12 +0000 (04:27 +0000)
* thread.h (struct _winsup_t): Add mnt_ elements.
* path.cc (fillout_mntent): Use mnt_ elements from reent_winsup ().

winsup/cygwin/ChangeLog
winsup/cygwin/path.cc
winsup/cygwin/shared_info.h
winsup/cygwin/thread.h

index 6b6cd1d57d25a1021c2acf9e3c4d573b7407fc00..60fb23615c7cce66bec9e274773f938ed8c085b9 100644 (file)
@@ -1,3 +1,9 @@
+Mon Apr  2 00:24:08 2001  Christopher Faylor <cgf@cygnus.com>
+
+       * shared_info.h (mount_info): Remove mnt_ elements.
+       * thread.h (struct _winsup_t): Add mnt_ elements.
+       * path.cc (fillout_mntent): Use mnt_ elements from reent_winsup ().
+
 Sun Apr  1 20:10:34 2001  Christopher Faylor <cgf@cygnus.com>
 
        * exceptions.cc (sigframe::call_signal_handler): Return value of
index fe3c78c75aac2cc69e955f93b73aa8ca4b805bbe..ec14ea84758f13956df67b86336e35c71f8daecb 100644 (file)
@@ -2049,37 +2049,36 @@ fillout_mntent (const char *native_path, const char *posix_path, unsigned flags)
      table because the mount table might change, causing weird effects
      from the getmntent user's point of view. */
 
-  strcpy (mount_table->mnt_fsname, native_path);
-  ret.mnt_fsname = mount_table->mnt_fsname;
-  strcpy (mount_table->mnt_dir, posix_path);
-  ret.mnt_dir = mount_table->mnt_dir;
+  strcpy (_reent_winsup ()->mnt_fsname, native_path);
+  ret.mnt_fsname = _reent_winsup ()->mnt_fsname;
+  strcpy (_reent_winsup ()->mnt_dir, posix_path);
+  ret.mnt_dir = _reent_winsup ()->mnt_dir;
 
   if (!(flags & MOUNT_SYSTEM))         /* user mount */
-    strcpy (mount_table->mnt_type, (char *) "user");
+    strcpy (_reent_winsup ()->mnt_type, (char *) "user");
   else                                 /* system mount */
-    strcpy (mount_table->mnt_type, (char *) "system");
+    strcpy (_reent_winsup ()->mnt_type, (char *) "system");
 
-  if ((flags & MOUNT_AUTO))            /* cygdrive */
-    strcat (mount_table->mnt_type, (char *) ",noumount");
-
-  ret.mnt_type = mount_table->mnt_type;
+  ret.mnt_type = _reent_winsup ()->mnt_type;
 
   /* mnt_opts is a string that details mount params such as
      binary or textmode, or exec.  We don't print
      `silent' here; it's a magic internal thing. */
 
   if (!(flags & MOUNT_BINARY))
-    strcpy (mount_table->mnt_opts, (char *) "textmode");
+    strcpy (_reent_winsup ()->mnt_opts, (char *) "textmode");
   else
-    strcpy (mount_table->mnt_opts, (char *) "binmode");
+    strcpy (_reent_winsup ()->mnt_opts, (char *) "binmode");
 
   if (flags & MOUNT_CYGWIN_EXEC)
-    strcat (mount_table->mnt_opts, (char *) ",cygexec");
+    strcat (_reent_winsup ()->mnt_opts, (char *) ",cygexec");
   else if (flags & MOUNT_EXEC)
-    strcat (mount_table->mnt_opts, (char *) ",exec");
+    strcat (_reent_winsup ()->mnt_opts, (char *) ",exec");
 
+  if ((flags & MOUNT_AUTO))            /* cygdrive */
+    strcat (_reent_winsup ()->mnt_opts, (char *) ",noumount");
 
-  ret.mnt_opts = mount_table->mnt_opts;
+  ret.mnt_opts = _reent_winsup ()->mnt_opts;
 
   ret.mnt_freq = 1;
   ret.mnt_passno = 1;
index cdaacebda3fe5cc17fca9e454233b3850666b1bd..01e1e2bfd48b8e0db3c53616882704e290b766f1 100644 (file)
@@ -40,7 +40,7 @@ public:
    scheme should be satisfactory for a long while yet.  */
 #define MAX_MOUNTS 30
 
-#define MOUNT_VERSION  0x01010102
+#define MOUNT_VERSION  0x01010103
 
 class reg_key;
 class mount_info
@@ -51,12 +51,6 @@ public:
   int nmounts;
   mount_item mount[MAX_MOUNTS];
 
-  /* Strings used by getmntent(). */
-  char mnt_type[20];
-  char mnt_opts[20];
-  char mnt_fsname[MAX_PATH];
-  char mnt_dir[MAX_PATH];
-
   /* cygdrive_prefix is used as the root of the path automatically
      prepended to a path when the path has no associated mount.
      cygdrive_flags are the default flags for the cygdrives. */
index 8e9ac25715c9c20d2a5717174a3284391d5b7274..deeef50f55032a5134eeafff832cd86458185ecf 100644 (file)
@@ -88,6 +88,10 @@ struct _winsup_t
   struct mntent mntbuf;
   int _iteration;
   DWORD available_drives;
+  char mnt_type[80];
+  char mnt_opts[80];
+  char mnt_fsname[MAX_PATH];
+  char mnt_dir[MAX_PATH];
 
   /* strerror */
   char _strerror_buf[20];
This page took 0.039994 seconds and 5 git commands to generate.