]> sourceware.org Git - newlib-cygwin.git/commitdiff
* path.cc (mount_info::add_item): The previous patch can't handle the case of
authorChristopher Faylor <me@cgf.cx>
Tue, 13 Jun 2000 16:48:37 +0000 (16:48 +0000)
committerChristopher Faylor <me@cgf.cx>
Tue, 13 Jun 2000 16:48:37 +0000 (16:48 +0000)
overwriting a mount entry.

winsup/cygwin/ChangeLog
winsup/cygwin/path.cc

index eb6afc7ab3251bc3daa8e3b3cc63a1344878d545..23db82bd6432c26e87944bc44002f9beed91e852 100644 (file)
@@ -1,3 +1,8 @@
+Tue Jun 13 12:41:41 2000  Kazuhiro Fujieda  <fujieda@jaist.ac.jp>
+
+       * path.cc (mount_info::add_item): The previous patch can't handle
+       the case of overwriting a mount entry.
+
 Tue Jun 13 00:17:04 2000  Christopher Faylor <cgf@cygnus.com>
 
        * thread.h: Shorten "current_directory" variables to "cwd_*"
index f491be0145a325f6a17178762105930092800ca5..2b7e58be03c653e45812152b24810f9706ed966f 100644 (file)
@@ -1645,13 +1645,15 @@ mount_info::add_item (const char *native, const char *posix, unsigned mountflags
        break;
     }
 
-  /* Can't add more than MAX_MOUNTS. */
-  if (i == nmounts && nmounts < MAX_MOUNTS)
-    i = nmounts++;
-  else
+  if (i == nmounts)
     {
-      set_errno (EMFILE);
-      return -1;
+      if (nmounts < MAX_MOUNTS)
+       i = nmounts++;
+      else
+       {
+         set_errno (EMFILE);
+         return -1;
+       }
     }
 
   if (reg_p && add_reg_mount (nativetmp, posixtmp, mountflags))
This page took 0.03692 seconds and 5 git commands to generate.