This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: mounts, ls, and filename completion


At 12:47 PM 8/12/98 -0700, Earnie Boyd wrote:
>I hope I can do this easily so that all can understand:
>
>When you `mount -b D:/ /foo' the mounted reference is a logical
>pointer to the D:/ root directory _NOT_ to the directory /foo on D:. 
>Therefore, when you do `ls /foo' you will also see the /foo directory
>and you would be able to do `cd /foo/foo'.

This is only the case where d:/ is mount as / previously.  While I would
agree with you that this is confusing, I see no benefit to doing this and
can't imagine why someone would.  If they want to do this and it confuses
them, I think that's a reasonable result.

>Let us suppose that the `/' root directory is mounted to c:\ and that
>/foo resides on c:\.  Let us now suppose you `mount -b D:/ /foo'.  You
>still have a logical pointer to the D:/ root directory and filesystem
>commands to /foo will look at the D:/ root directory and c:/foo will
>not be used (usually).

Yes, so?  Just like on UNIX, a directory used as a mount point for another
is "hidden" while it is used this way.  If you were to unmount it, any
files and directories under it will be available again.  If you want to 
argue that this is confusing semantics, that's fine.  However, that's a 
personal perception since it is one that would not be shared by those who
are familiar with mounts on UNIX systems and, more importantly, all the
UNIX versions of the GNU tools (which is what cygwin32 uses)!

>As for confusing cygwin32, which one is it supposed to use?  It will
>attempt to use the logical pointer /foo and usually does; however, it
>is possible for it to use the physical directory /foo and occasionally
>does.  When I was testing to respond to your querys, cygwin32 gave me
>"permission denied" errors accessing such a mounted directory.

cygwin32 should always use the mounted directory, not the mount point.
If it doesn't (and I'm quite sure there are some cases where things are
not quite as they are supposed to be here), then its a bug that needs to
be fixed.  I've used mounts with directories as mount points for quite a
while now.  I've never gotten "permission denied" when trying to access
the directory.  I won't say that there isn't some bug that would generate
that error when someone was trying to do so though.

>To help you understand the cygwin mount table, think of it more as a
>symbolic link table than as a table of directories available for use
>by the user.  To help you further understand, remember that you are
>emulating UNIX, not using UNIX and that you are really using WIN32.

And as an emulation, cygwin's mount table should attempt to emulate the
behavior of mount points on UNIX as closely as possible.  If that doesn't
happen, there will definitely be problems for the tools.  Whether one is
working on WIN32 or UNIX, the UNIX versions of GNU tools expect a UNIXy
environment.  If you don't provide that, the tools will not work as well,
as seen by the original poster.  It may or may not be worth arguing that
the tools and/or the cygwin32 environment should work one way or the other
to be more accommodating under WIN32.  However for the moment, as a matter 
of practicality, mounts at least work best when mounted to a mount point.
This may be confusing to you and possibly many others but I submit that
any facility that can be clearly explained (as this can) is only confusing
so long as the explanation is unknown.  Once it is known, confusion usually
slips away, perhaps to be replaced by a personal preference that it work
in a different way.

Thanks for taking the time to respond to these queries.  I, however, remain
unconvinced that there is anything innately confusing about using mount 
points for directories/drives that are mounted.  I can't see any real 
reason to stop recommending this approach to others...

 
Larry
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]