delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2000/06/14/01:03:26

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
From: Chris Faylor <cgf AT cygnus DOT com>
Date: Wed, 14 Jun 2000 01:03:12 -0400
To: cygwin-developers AT sourceware DOT cygnus DOT com
Subject: Re: mount doesn't complain about missing "mount directory" any more?
Message-ID: <20000614010312.B7392@cygnus.com>
Reply-To: cygwin-developers AT sourceware DOT cygnus DOT com
Mail-Followup-To: cygwin-developers AT sourceware DOT cygnus DOT com
References: <20000613213415 DOT A20386 AT cygnus DOT com> <s1s66rdq93c DOT fsf AT jaist DOT ac DOT jp> <20000613225819 DOT A12800 AT cygnus DOT com> <s1s3dmgrjm2 DOT fsf AT jaist DOT ac DOT jp>
Mime-Version: 1.0
User-Agent: Mutt/1.2i
In-Reply-To: <s1s3dmgrjm2.fsf@jaist.ac.jp>; from fujieda@jaist.ac.jp on Wed, Jun 14, 2000 at 01:07:17PM +0900

On Wed, Jun 14, 2000 at 01:07:17PM +0900, Kazuhiro Fujieda wrote:
>>>> On Tue, 13 Jun 2000 22:58:20 -0400
>>>> Chris Faylor <cgf AT cygnus DOT com> said:
>
>> Ok.  I'm sorry.  I didn't remember that -f avoided the error.  Is this
>> new or has it always been like that?
>
>The latter. The `mount' with -f had avoided the error before my
>patch was applied.
>
>> Btw, it sure would be nice if you could do this:
>> 
>> mount c:/foo /foo
>> umount c:/foo	#doesn't work (but would be nice)
>> umount /foo	#work
>> 
>> If you have an idle moment it would be nice to add this functionality to
>> mount to make it behave more like the UNIX version.
>
>`umount' has already reject win32 paths in del_reg_mount().
>Anyway I removed the meaningless comparison in mount_info::del_item().

I think you may have misunderstood me.  I wanted to be able to
type "umount c:\foo" (I got the backslash wrong above) and have
it remove the mount point.  This is what it does on UNIX.

It looks like the code that you replaced was trying to allow that
but was failing in the case of the "native_path" for some reason.

cgf

>ChangeLog:
>2000-06-14  Kazuhiro Fujieda <fujieda AT jaist DOT ac DOT jp>
>	* path.cc (mount_info::del_item): Eliminate the comparison between 
>	the target mount point and native paths of mount entries.
>
>Index: path.cc
>===================================================================
>RCS file: /cvs/src/src/winsup/cygwin/path.cc,v
>retrieving revision 1.30
>diff -u -p -r1.30 path.cc
>--- path.cc	2000/06/13 16:48:37	1.30
>+++ path.cc	2000/06/14 03:48:51
>@@ -1696,9 +1696,7 @@ mount_info::del_item (const char *path, 
> 
>   for (int i = 0; i < nmounts; i++)
>     {
>-      /* Delete if paths and mount locations match. */
>-      if ((strcasematch (mount[i].posix_path, pathtmp)
>-	   || strcasematch (mount[i].native_path, pathtmp)) &&
>+      if (strcasematch (mount[i].posix_path, pathtmp) &&
> 	  (mount[i].flags & MOUNT_SYSTEM) == (flags & MOUNT_SYSTEM))
> 	{
> 	  nmounts--;		/* One less mount table entry */
>
>____
>  | AIST      Kazuhiro Fujieda <fujieda AT jaist DOT ac DOT jp>
>  | HOKURIKU  School of Information Science
>o_/ 1990      Japan Advanced Institute of Science and Technology

-- 
cgf AT cygnus DOT com                        Cygnus Solutions, a Red Hat company
http://sourceware.cygnus.com/         http://www.redhat.com/

- Raw text -


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