delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/01/24/14:12:25

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
X-Apparently-From: <earnie?boyd AT yahoo DOT com>
Message-ID: <3A6F2317.686CD2BD@yahoo.com>
Date: Wed, 24 Jan 2001 13:46:47 -0500
From: Earnie Boyd <earnie_boyd AT yahoo DOT com>
Reply-To: cygwin AT sources DOT redhat DOT com
X-Mailer: Mozilla 4.76 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: "Larry Hall (RFK Partners, Inc)" <lhall AT rfk DOT com>
CC: ehud AT unix DOT simonwiesel DOT co DOT il, lowella AT serv DOT net, cygwin AT sources DOT redhat DOT com
Subject: Re: 1.1.7:mount and ls problem
References: <4 DOT 3 DOT 1 DOT 2 DOT 20010124100612 DOT 021e0c10 AT pop DOT ma DOT ultranet DOT com>
<4 DOT 3 DOT 1 DOT 2 DOT 20010123202852 DOT 022d7ce8 AT pop DOT ma DOT ultranet DOT com>
<4 DOT 3 DOT 1 DOT 2 DOT 20010124100612 DOT 021e0c10 AT pop DOT ma DOT ultranet DOT com> <4 DOT 3 DOT 1 DOT 2 DOT 20010124121519 DOT 0228be88 AT pop DOT ma DOT ultranet DOT com>

"Larry Hall (RFK Partners, Inc)" wrote:
> 
> At 11:56 AM 1/24/2001, Ehud Karni wrote:
> > >          cd /
> > >          mkdir e
> > >          mount e: /e
> > > All is well -- e shows up in both an ls ( as e) and mount (as e:  /e).
> > >
> > >          mount f: /f
> > > I get the error:
> > >          mount: warning - /f does not exist
> > > but mount shows
> > >          f:   f/ . . .
> > > and ls doesn't show f.
> > >
> > > If I do mkdir f, I get:
> > >          mkdir: cannot make directory `f': File exists
> >
> >On UNIX systems, you can NOT mount on non-existing directory.
> >
> >I think Cygwin can adopt this behavior and refuse to mount when the
> >directory is missing. There are 2 ways to accomplish this:
> >     1. Create the directory (silently or with a message).
> >     2. Produce an  error and do not mount.
> >The 2nd approach has the possible problem for mounts that was done
> >previously (saved in the registry) - the mount directory may be erased
> >by a non Cygwin program. In that case I will produce an error message
> >every time the DLL try to use this mount, and ignore it (but not
> >delete it from the registry).
> 
> This may be an issue.  The simple approach for handling this here would
> be do 1, although one could always see what UNIX/Linux does in these cases
> too.  As I recall, UNIX/Linux simply displays an error if the directory to
> mount to is removed.  I see no real problem with supporting this approach
> either.
> 

There is no way that I know of to prevent the user from removing the
directory even if mounted.  The user could still use the Windows File
Explorer or a cmd/command window to remove the directory.  To make it
more difficult I suppose that the mount point directory could be marked
with the system attribute when mounted and remove the system attribute
when unmounted.  However, this still wouldn't prevent it's removal. 
What I would suggest for this is that if the physical mount point
directory is removed Cygwin recognizes this and removes the mount entry.

What ever the solution is, the incorrect solution is to create the
supposed physical directory.  Recently, I've been creating a /cygmnt
directory at the root of each of my drive letters.  I then create mount
points under the /cygmnt.  So if I want to have a mount point foo on
drive D: then I would   mkdir D:/cygmnt/foo
  mount -b D:/cygmnt/foo /foo
The reason I do this is for ease of recognition of what I have mounted
on what devices.

> 
> >I don't know the reasons of the Cygwin developers for choosing the
> >current behavior but I'm sure they had something in mind if they
> >decided to deviate from standard UNIX practice.
> 
> Yes, I'm sure there was a reason.  It may have just been for "expediency".
> In any case, its not worth speculating unless someone plans to take up the
> task.
> 

IIRC, the decision for the warning was because it didn't use to warn or
error and it was desired not to make it any more difficult.  I don't
remember if Geoff Noer had intentioned it remaining a warning.  This
goes back to 1998 if anyone cares to search the archives.

Earnie.

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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