public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* 1.1.7:mount and ls problem
@ 2001-01-23 16:47 L Anderson
  2001-01-23 17:35 ` Larry Hall (RFK Partners, Inc)
  2001-01-23 18:26 ` Earnie Boyd
  0 siblings, 2 replies; 11+ messages in thread
From: L Anderson @ 2001-01-23 16:47 UTC (permalink / raw)
  To: cygwin

Hi,

Being new to Cygwin, I searched the faq and mail archives but could find
no answer to my question.  An answer would be appreciated.

I'm running Win98 and Cygwin 1.1.7.

I have drives ... e:, f:, g: ... on win98.  I installed cygwin on g:.  I
fire up cygwin and do:
	cd /
	mkdir e
	mount e: /e
All is well -- e shows up in both an ls ( as e) and mount (as e:  /e).

Now I do:
	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 an ls f, all the files under f:'s root are listed.

If I do mkdir f, I get:
	mkdir: cannot make directory `f': File exists

So where is f hiding except in the mount table?

Why does f seem to work like any other directory (I can cd to it or its
subdirs and ls their contents) but not show up in an ls at the root?


Is this a bug or a feature?

Thanks,

L Anderson

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 1.1.7:mount and ls problem
  2001-01-23 16:47 1.1.7:mount and ls problem L Anderson
@ 2001-01-23 17:35 ` Larry Hall (RFK Partners, Inc)
       [not found]   ` <3A6E67E5.CD2C0CF7@serv.net>
  2001-01-23 18:26 ` Earnie Boyd
  1 sibling, 1 reply; 11+ messages in thread
From: Larry Hall (RFK Partners, Inc) @ 2001-01-23 17:35 UTC (permalink / raw)
  To: L Anderson, cygwin

At 07:46 PM 1/23/2001, L Anderson wrote:
>Hi,
>
>Being new to Cygwin, I searched the faq and mail archives but could find
>no answer to my question.  An answer would be appreciated.
>
>I'm running Win98 and Cygwin 1.1.7.
>
>I have drives ... e:, f:, g: ... on win98.  I installed cygwin on g:.  I
>fire up cygwin and do:
>         cd /
>         mkdir e
>         mount e: /e
>All is well -- e shows up in both an ls ( as e) and mount (as e:  /e).
>
>Now I do:
>         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 an ls f, all the files under f:'s root are listed.
>
>If I do mkdir f, I get:
>         mkdir: cannot make directory `f': File exists
>
>So where is f hiding except in the mount table?
>
>Why does f seem to work like any other directory (I can cd to it or its
>subdirs and ls their contents) but not show up in an ls at the root?
>
>
>Is this a bug or a feature?



Neither.  Its a misuse.  If you don't create the directory to mount to,
mount only warns you but you should read that warning as an indication 
that you may see problems when you use this mount point.



Larry Hall                              lhall@rfk.com
RFK Partners, Inc.                      http://www.rfk.com
118 Washington Street                   (508) 893-9779 - RFK Office
Holliston, MA 01746                     (508) 893-9889 - FAX



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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 1.1.7:mount and ls problem
  2001-01-23 16:47 1.1.7:mount and ls problem L Anderson
  2001-01-23 17:35 ` Larry Hall (RFK Partners, Inc)
@ 2001-01-23 18:26 ` Earnie Boyd
  2001-01-23 23:55   ` L Anderson
  1 sibling, 1 reply; 11+ messages in thread
From: Earnie Boyd @ 2001-01-23 18:26 UTC (permalink / raw)
  To: L Anderson; +Cc: cygwin

L Anderson wrote:

> Hi,
>
> Being new to Cygwin, I searched the faq and mail archives but could find
> no answer to my question.  An answer would be appreciated.
>
> I'm running Win98 and Cygwin 1.1.7.
>
> I have drives ... e:, f:, g: ... on win98.  I installed cygwin on g:.  I
> fire up cygwin and do:
>         cd /
>         mkdir e
>         mount e: /e
> All is well -- e shows up in both an ls ( as e) and mount (as e:  /e).
>
> Now I do:
>         mount f: /f
> I get the error:
>         mount: warning - /f does not exist
> but mount shows
>         f:   f/ . . .
> and ls doesn't show f.

Note: it says warning, it doesn't say error.  The non-list would be the
reason for the warning.  IMO, it's probably time to make it an error.

>
>
> If I do an ls f, all the files under f:'s root are listed.

>
> If I do mkdir f, I get:
>         mkdir: cannot make directory `f': File exists
>

Yes, another reason for the warning.  You can either umount /f and then do
the  mkdir /f and mount f:/ /f or you can mkdir /cygdrive/c/cygwin/f
assuming / is pointed at c:/cygwin

>
> So where is f hiding except in the mount table?
>

The mount table, in the windows registry.

>
> Why does f seem to work like any other directory (I can cd to it or its
> subdirs and ls their contents) but not show up in an ls at the root?
>
> Is this a bug or a feature?
>

It's a feature with old history.

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 1.1.7:mount and ls problem
  2001-01-23 18:26 ` Earnie Boyd
@ 2001-01-23 23:55   ` L Anderson
  2001-01-24  6:16     ` Earnie Boyd
  0 siblings, 1 reply; 11+ messages in thread
From: L Anderson @ 2001-01-23 23:55 UTC (permalink / raw)
  To: cygwin

Hi Earnie,

Thanks for your reply.  I have commented below:

Earnie Boyd wrote:
> 
> L Anderson wrote:
> 
> > Hi,
> >
> > Being new to Cygwin, I searched the faq and mail archives but could find
> > no answer to my question.  An answer would be appreciated.
> >
> > I'm running Win98 and Cygwin 1.1.7.
> >
> > I have drives ... e:, f:, g: ... on win98.  I installed cygwin on g:.  I
> > fire up cygwin and do:
> >         cd /
> >         mkdir e
> >         mount e: /e
> > All is well -- e shows up in both an ls ( as e) and mount (as e:  /e).
> >
> > Now I do:
> >         mount f: /f
> > I get the error:
> >         mount: warning - /f does not exist
> > but mount shows
> >         f:   f/ . . .
> > and ls doesn't show f.
> 
> Note: it says warning, it doesn't say error.  The non-list would be the
> reason for the warning.  IMO, it's probably time to make it an error.
> 

Ah! Since it says "warning", the "principle of least astonishment"
should not have been violated and therefore, the software should have
acted consistent with my first example, i.e., have done a "mkdir f"
before doing the "mount f: f/"?

At this point, I don't know what you mean by "non-list", so I can't
comment.

Based on the "side effects" of the command sequence, I agree. The
software should have "done it right" or only issued an error message
that said, effectively, "Hey dude, create the damn directory before you
do a mount!  Don't leave it up to me!" :-)

> >
> >
> > If I do an ls f, all the files under f:'s root are listed.
> 
> >
> > If I do mkdir f, I get:
> >         mkdir: cannot make directory `f': File exists
> >
> 
> Yes, another reason for the warning.  You can either umount /f and then do
> the  mkdir /f and mount f:/ /f or you can mkdir /cygdrive/c/cygwin/f
> assuming / is pointed at c:/cygwin
> 

I figured this out but it still doesn't answer why the directory for f
(mount point) looks like any other directory but doesn't show up in an
"ls" in the root?

> >
> > So where is f hiding except in the mount table?
> >
> 
> The mount table, in the windows registry.
>

This confirms what I expected but why doesn't "f" show up in an "ls" in
the root (/)?

> >
> > Why does f seem to work like any other directory (I can cd to it or its
> > subdirs and ls their contents) but not show up in an ls at the root?
> >
> > Is this a bug or a feature?
> >
> 
> It's a feature with old history.
> 

Sounds like the code needs a good "slap side da head"!  Unfortunately,
I'm not there yet.  Is it a problem with "mount", "ls", "cygwinxxx.dll",
or ...?

Thanks for your help!

Lowell Anderson

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 1.1.7:mount and ls problem
  2001-01-23 23:55   ` L Anderson
@ 2001-01-24  6:16     ` Earnie Boyd
  0 siblings, 0 replies; 11+ messages in thread
From: Earnie Boyd @ 2001-01-24  6:16 UTC (permalink / raw)
  To: L Anderson; +Cc: cygwin

L Anderson wrote:
> 
> Hi Earnie,
> 
> Thanks for your reply.  I have commented below:
> 
> Earnie Boyd wrote:
> >
> > L Anderson wrote:
> >
> > > Hi,
> > >
> > > Being new to Cygwin, I searched the faq and mail archives but could find
> > > no answer to my question.  An answer would be appreciated.
> > >
> > > I'm running Win98 and Cygwin 1.1.7.
> > >
> > > I have drives ... e:, f:, g: ... on win98.  I installed cygwin on g:.  I
> > > fire up cygwin and do:
> > >         cd /
> > >         mkdir e
> > >         mount e: /e
> > > All is well -- e shows up in both an ls ( as e) and mount (as e:  /e).
> > >
> > > Now I do:
> > >         mount f: /f
> > > I get the error:
> > >         mount: warning - /f does not exist
> > > but mount shows
> > >         f:   f/ . . .
> > > and ls doesn't show f.
> >
> > Note: it says warning, it doesn't say error.  The non-list would be the
> > reason for the warning.  IMO, it's probably time to make it an error.
> >
> 
> Ah! Since it says "warning", the "principle of least astonishment"
> should not have been violated and therefore, the software should have
> acted consistent with my first example, i.e., have done a "mkdir f"
> before doing the "mount f: f/"?
> 
> At this point, I don't know what you mean by "non-list", so I can't
> comment.
> 

I was in reference to your complaint that `ls' doesn't show it.

> Based on the "side effects" of the command sequence, I agree. The
> software should have "done it right" or only issued an error message
> that said, effectively, "Hey dude, create the damn directory before you
> do a mount!  Don't leave it up to me!" :-)
> 
> > >
> > >
> > > If I do an ls f, all the files under f:'s root are listed.
> >
> > >
> > > If I do mkdir f, I get:
> > >         mkdir: cannot make directory `f': File exists
> > >
> >
> > Yes, another reason for the warning.  You can either umount /f and then do
> > the  mkdir /f and mount f:/ /f or you can mkdir /cygdrive/c/cygwin/f
> > assuming / is pointed at c:/cygwin
> >
> 
> I figured this out but it still doesn't answer why the directory for f
> (mount point) looks like any other directory but doesn't show up in an
> "ls" in the root?
> 
> > >
> > > So where is f hiding except in the mount table?
> > >
> >
> > The mount table, in the windows registry.
> >
> 
> This confirms what I expected but why doesn't "f" show up in an "ls" in
> the root (/)?
> 

Uh, ls doesn't show it because ls is displaying the contents of the disk
and it doesn't reside on the disk.

> > >
> > > Why does f seem to work like any other directory (I can cd to it or its
> > > subdirs and ls their contents) but not show up in an ls at the root?
> > >
> > > Is this a bug or a feature?
> > >
> >
> > It's a feature with old history.
> >
> 
> Sounds like the code needs a good "slap side da head"!  Unfortunately,
> I'm not there yet.  Is it a problem with "mount", "ls", "cygwinxxx.dll",
> or ...?
> 

Yep.  It would be mount.  See src/winsup/utils/mount.cc

> Thanks for your help!
> 

You're welcome,
Earnie

> Lowell Anderson
>

_________________________________________________________
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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 1.1.7:mount and ls problem
       [not found]   ` <3A6E67E5.CD2C0CF7@serv.net>
@ 2001-01-24  7:27     ` Larry Hall (RFK Partners, Inc)
  2001-01-24  8:57       ` Ehud Karni
  0 siblings, 1 reply; 11+ messages in thread
From: Larry Hall (RFK Partners, Inc) @ 2001-01-24  7:27 UTC (permalink / raw)
  To: L Anderson; +Cc: cygwin

At 12:28 AM 1/24/2001, L Anderson wrote:


>"Larry Hall (RFK Partners, Inc)" wrote:
> > 
> > At 07:46 PM 1/23/2001, L Anderson wrote:
> > >Hi,
> > >
> > >Being new to Cygwin, I searched the faq and mail archives but could find
> > >no answer to my question.  An answer would be appreciated.
> > >
> > >I'm running Win98 and Cygwin 1.1.7.
> > >
> > >I have drives ... e:, f:, g: ... on win98.  I installed cygwin on g:.  I
> > >fire up cygwin and do:
> > >         cd /
> > >         mkdir e
> > >         mount e: /e
> > >All is well -- e shows up in both an ls ( as e) and mount (as e:  /e).
> > >
> > >Now I do:
> > >         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 an ls f, all the files under f:'s root are listed.
> > >
> > >If I do mkdir f, I get:
> > >         mkdir: cannot make directory `f': File exists
> > >
> > >So where is f hiding except in the mount table?
> > >
> > >Why does f seem to work like any other directory (I can cd to it or its
> > >subdirs and ls their contents) but not show up in an ls at the root?
> > >
> > >
> > >Is this a bug or a feature?
> > 
> > Neither.  Its a misuse.  If you don't create the directory to mount to,
> > mount only warns you but you should read that warning as an indication
> > that you may see problems when you use this mount point.
> > 
>
>Hi,
>
>Thanks for taking the time to reply to my question.  Although your
>answer provides considerable insight to me, unfortunately it causes me
>to conclude not a "misuse", but a "design/coding flaw" is as work here. 
>Your answer confirms that a "mkdir f" is required/expected(?)--which I
>suspected--before the "mount" command.  The subsequent message: "mount:
>warning - /f does not exist" and the attendant side effects, convince me
>that the "principle of least astonishment" is severely violated.  Since
>all other trappings of a "legitimate directory" are evident after "my
>misuse" and the message was only a "warning", it's reasonable to expect
>the code would have, effectively, done a "mkdir f" if "f" didn't exist
>where the "warning" was a polite way of saying "Hey Dud! You screwed the
>pooch and failed to create 'f'.  I did it for you this time, but next
>time, shape up!" :-)  Baring that, the code should have done nothing
>except issue an error if the directory didn't exist.  After all, it's
>just software. :-).
>
>Again, thanks for your reply.


I don't disagree with the general principle that if the mount requires a 
directory, the warning is insufficient.  I would prefer an error in this
case over automatic creation of the directory, since this would catch the
case where someone mistypes the desired, existing directory name.  Displaying
an error would also be consistent with UNIX/Linux platforms, which I think is 
a plus too.

In the overall evolution of this functionality, things are getting closer 
and closer to UNIX/Linux.  It was not that long ago that there was no check 
made for the existence of the directory.  

I'm sure the warning issue will be rectified eventually but if you feel it is 
an important feature and want to see it included sooner rather than later, 
feel free to submit a patch.  Functional priorities differ from person to 
person and since this is open-source and a volunteer effort, this issue may 
not get addressed in the near term, unless someone else finds its resolution 
of particular interest.

Thanks for bringing the issue to light.  In some cases, having a discussion 
of an issue in the mail archives helps others with similar questions later.
In that context, I have directed my response to your comments back to the 
list.  I hope you don't mind.

Regards,



Larry Hall                              lhall@rfk.com
RFK Partners, Inc.                      http://www.rfk.com
118 Washington Street                   (508) 893-9779 - RFK Office
Holliston, MA 01746                     (508) 893-9889 - FAX



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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 1.1.7:mount and ls problem
  2001-01-24  7:27     ` Larry Hall (RFK Partners, Inc)
@ 2001-01-24  8:57       ` Ehud Karni
  2001-01-24  9:26         ` Larry Hall (RFK Partners, Inc)
  2001-01-24 12:28         ` Christopher Faylor
  0 siblings, 2 replies; 11+ messages in thread
From: Ehud Karni @ 2001-01-24  8:57 UTC (permalink / raw)
  To: lhall; +Cc: lowella, cygwin

>          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).

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.

BTW. I adhere to UNIX practice, I mount only on existing directories
     and always use the -s switch (no private mounts on UNIX).

Ehud.


-- 
 @@@@@@ @@@ @@@@@@ @    @   Ehud Karni  Simon & Wiesel  Insurance agency
     @    @      @  @@  @   Tel: +972-3-6212-757    Fax: +972-3-6292-544
     @    @ @    @ @  @@    (USA)  Fax  and  voice  mail:  1-815-5509341
     @    @ @    @ @    @        Better     Safe     Than     Sorry
 http://www.simonwiesel.co.il    mailto:ehud@unix.simonwiesel.co.il

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 1.1.7:mount and ls problem
  2001-01-24  8:57       ` Ehud Karni
@ 2001-01-24  9:26         ` Larry Hall (RFK Partners, Inc)
  2001-01-24 10:46           ` Earnie Boyd
  2001-01-24 12:28         ` Christopher Faylor
  1 sibling, 1 reply; 11+ messages in thread
From: Larry Hall (RFK Partners, Inc) @ 2001-01-24  9:26 UTC (permalink / raw)
  To: ehud; +Cc: lowella, cygwin

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.
  

>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.



Larry Hall                              lhall@rfk.com
RFK Partners, Inc.                      http://www.rfk.com
118 Washington Street                   (508) 893-9779 - RFK Office
Holliston, MA 01746                     (508) 893-9889 - FAX



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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 1.1.7:mount and ls problem
  2001-01-24  9:26         ` Larry Hall (RFK Partners, Inc)
@ 2001-01-24 10:46           ` Earnie Boyd
  2001-01-24 11:17             ` Larry Hall (RFK Partners, Inc)
  0 siblings, 1 reply; 11+ messages in thread
From: Earnie Boyd @ 2001-01-24 10:46 UTC (permalink / raw)
  To: Larry Hall (RFK Partners, Inc); +Cc: ehud, lowella, cygwin

"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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 1.1.7:mount and ls problem
  2001-01-24 10:46           ` Earnie Boyd
@ 2001-01-24 11:17             ` Larry Hall (RFK Partners, Inc)
  0 siblings, 0 replies; 11+ messages in thread
From: Larry Hall (RFK Partners, Inc) @ 2001-01-24 11:17 UTC (permalink / raw)
  To: cygwin; +Cc: ehud, lowella, cygwin

At 01:46 PM 1/24/2001, Earnie Boyd wrote:
>"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.


My point was the reverse.  On UNIX/Linux, its possible to unmount a 
directory, delete the directory, and then attempt to remount it.  It 
will error.  Still, your point is a good one.  There is an asymmetry
on Windows since there is nothing that prevents the user from removing
any mounted directory by other means (this you cannot do on UNIX/Linux).  
There may be a way to lock the directory to prevent this or do as you 
suggest (or some other scheme) but I certainly accept that the UNIX/Linux 
mount symantics in this respect don't come for free in Windows/Cygwin 
environments.  Addressing this whole issue is a nice little project.:-)


>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.


Right.  Automatic creation of the directory, IMO, is worse than the 
current behavior.  I don't really like the idea although someone may be
able to convince me of at least a specific case where it makes sense.


> > 
> > >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.



I doubt it!;-)



Larry Hall                              lhall@rfk.com
RFK Partners, Inc.                      http://www.rfk.com
118 Washington Street                   (508) 893-9779 - RFK Office
Holliston, MA 01746                     (508) 893-9889 - FAX



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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 1.1.7:mount and ls problem
  2001-01-24  8:57       ` Ehud Karni
  2001-01-24  9:26         ` Larry Hall (RFK Partners, Inc)
@ 2001-01-24 12:28         ` Christopher Faylor
  1 sibling, 0 replies; 11+ messages in thread
From: Christopher Faylor @ 2001-01-24 12:28 UTC (permalink / raw)
  To: cygwin

On Wed, Jan 24, 2001 at 06:56:01PM +0200, 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.

The POSIX part of a mount does not have to be a directory.

cgf

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2001-01-24 12:28 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-23 16:47 1.1.7:mount and ls problem L Anderson
2001-01-23 17:35 ` Larry Hall (RFK Partners, Inc)
     [not found]   ` <3A6E67E5.CD2C0CF7@serv.net>
2001-01-24  7:27     ` Larry Hall (RFK Partners, Inc)
2001-01-24  8:57       ` Ehud Karni
2001-01-24  9:26         ` Larry Hall (RFK Partners, Inc)
2001-01-24 10:46           ` Earnie Boyd
2001-01-24 11:17             ` Larry Hall (RFK Partners, Inc)
2001-01-24 12:28         ` Christopher Faylor
2001-01-23 18:26 ` Earnie Boyd
2001-01-23 23:55   ` L Anderson
2001-01-24  6:16     ` Earnie Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).