delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2000/06/13/12:32:59

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-developers-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com
To: cygwin-developers AT sourceware DOT cygnus DOT com
Subject: Re: -f option to mount no longer works?
References: <20000610174812 DOT A4342 AT cygnus DOT com>
Mime-Version: 1.0 (generated by tm-edit 7.106)
From: Kazuhiro Fujieda <fujieda AT jaist DOT ac DOT jp>
Date: 14 Jun 2000 01:29:06 +0900
In-Reply-To: Chris Faylor's message of Sat, 10 Jun 2000 17:48:12 -0400
Message-ID: <s1sem61r1d9.fsf@jaist.ac.jp>
Lines: 52
X-Mailer: Gnus v5.3/Emacs 19.34

>>> On Sat, 10 Jun 2000 17:48:12 -0400
>>> Chris Faylor <cgf AT cygnus DOT com> said:

> I have just noticed that when I attempt to remount the root partition with
> a 'mount -f -b f:\cygwin /' it fails with a
> 
> mount: /: Too many mount entries
> 
> I don't have too many mount entries, of course.
> 
> Is this the result of Kazuhiro Fujieda's recent changes, maybe?

Yes, this is triggered by a simple mistake.

ChangeLog:
	path.cc (mount_info::add_item): The previous patch can't handle
	the case of overwriting a mount entry.

Index: path.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/path.cc,v
retrieving revision 1.29
diff -u -p -r1.29 path.cc
--- path.cc	2000/06/13 04:40:36	1.29
+++ path.cc	2000/06/13 16:22:31
@@ -1645,13 +1645,15 @@ mount_info::add_item (const char *native
 	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))

____
  | AIST      Kazuhiro Fujieda <fujieda AT jaist DOT ac DOT jp>
  | HOKURIKU  School of Information Science
o_/ 1990      Japan Advanced Institute of Science and Technology

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019