public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: mount never fails ... sorta
@ 2006-06-11 23:22 Richard Foulk
  2006-06-12  0:41 ` Larry Hall (Cygwin)
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Foulk @ 2006-06-11 23:22 UTC (permalink / raw)
  To: cygwin

> Richard Foulk wrote:
> > Give mount(1) nonexistent hosts or directories and it will complain,
> > but it still populates the mount table as if it succeeded.
> > 
> > It also always returns zero, for success or failure.
> 
> Cygwin's mount is a different bird than on Unix.  It really is just a mapping
> table of POSIX names to DOS or UNC-style paths.  It is not required that the
> POSIX path exist for things to work.  But since most people coming from a UNIX
> background expect that it does and it certainly helps things like shell
> path completion if the paths do already exist, you get a warning to let you
> know about this difference.
> 

I guess I should have said mount's behavior is wrong and broken.

It knows when there's an error it just does the wrong things.

	1. mount reports the error to stderr, but not via the return code.

	2. mount knows about the error but signals success anyway -- by
	   listing a (non-existent) mount within the mount table.

Sure Cygwin's mount is different than Unix's.  That's what Cygwin is all
about, hiding those differences.  Cygwin's mount fails at that.

Registering a mount that doesn't exist is quite broken.


Richard

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: mount never fails ... sorta
  2006-06-11 23:22 mount never fails ... sorta Richard Foulk
@ 2006-06-12  0:41 ` Larry Hall (Cygwin)
  0 siblings, 0 replies; 5+ messages in thread
From: Larry Hall (Cygwin) @ 2006-06-12  0:41 UTC (permalink / raw)
  To: cygwin

Richard Foulk wrote:
>> Richard Foulk wrote:
>>> Give mount(1) nonexistent hosts or directories and it will complain,
>>> but it still populates the mount table as if it succeeded.
>>>
>>> It also always returns zero, for success or failure.
>> Cygwin's mount is a different bird than on Unix.  It really is just a mapping
>> table of POSIX names to DOS or UNC-style paths.  It is not required that the
>> POSIX path exist for things to work.  But since most people coming from a UNIX
>> background expect that it does and it certainly helps things like shell
>> path completion if the paths do already exist, you get a warning to let you
>> know about this difference.
>>
> 
> I guess I should have said mount's behavior is wrong and broken.
> 
> It knows when there's an error it just does the wrong things.
> 
> 	1. mount reports the error to stderr, but not via the return code.


Well, if you feel strongly about this, then PTC.  If there's going to be
much worthwhile debate on this issue, giving the specifics of your
proposal via a patch makes it easy for people to provide specific
feedback.


> 	2. mount knows about the error but signals success anyway -- by
> 	   listing a (non-existent) mount within the mount table.


You say error now.  Before you called it as it's reported, a warning.  Seems
you're escalating things here without much cause.

'mount' lists the entry in the mount table because it is not *required* that
the target or the source exist at the time the entry is created for the mount
point to be valid.  The target *never* has to exist in the file system for the
mount point to work.  The source only needs to exist when the target path is
being used.  And at that point you get a very valid error if the target is
still not accessible - "No such file or directory".


> Sure Cygwin's mount is different than Unix's.  That's what Cygwin is all
> about, hiding those differences.  Cygwin's mount fails at that.


Cygwin's 'mount' has *no* functional overlap with Unix's, for better or worse.
If you expect Cygwin's 'mount' to do what the Unix 'mount' does, then you're
going to be very disappointed.  The semantics are completely different.  If
you want to argue that Cygwin's 'mount' and 'umount' commands should be called
something else because of this difference, that's reasonable (though not very
likely to happen given it's historical usage in the Cygwin environment and the
lack of file system drivers in Cygwin to support "real" mounting).  But that's
not a basis on which to claim that Cygwin's 'mount' is broken.


> Registering a mount that doesn't exist is quite broken.

Have you tried it?  It works just as I've described.  Something that works
can't really be termed "broken".


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

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: mount never fails ... sorta
  2006-06-11 13:57 Richard Foulk
  2006-06-11 18:04 ` Larry Hall (Cygwin)
@ 2006-06-11 19:31 ` Christopher Faylor
  1 sibling, 0 replies; 5+ messages in thread
From: Christopher Faylor @ 2006-06-11 19:31 UTC (permalink / raw)
  To: cygwin

On Sun, Jun 11, 2006 at 02:34:53AM -1000, Richard Foulk wrote:
>Give mount(1) nonexistent hosts or directories and it will complain,
>but it still populates the mount table as if it succeeded.
>
>It also always returns zero, for success or failure.

Correct.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: mount never fails ... sorta
  2006-06-11 13:57 Richard Foulk
@ 2006-06-11 18:04 ` Larry Hall (Cygwin)
  2006-06-11 19:31 ` Christopher Faylor
  1 sibling, 0 replies; 5+ messages in thread
From: Larry Hall (Cygwin) @ 2006-06-11 18:04 UTC (permalink / raw)
  To: cygwin

Richard Foulk wrote:
> Give mount(1) nonexistent hosts or directories and it will complain,
> but it still populates the mount table as if it succeeded.
> 
> It also always returns zero, for success or failure.


Cygwin's mount is a different bird than on Unix.  It really is just a mapping
table of POSIX names to DOS or UNC-style paths.  It is not required that the
POSIX path exist for things to work.  But since most people coming from a UNIX
background expect that it does and it certainly helps things like shell
path completion if the paths do already exist, you get a warning to let you
know about this difference.


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

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* mount never fails ... sorta
@ 2006-06-11 13:57 Richard Foulk
  2006-06-11 18:04 ` Larry Hall (Cygwin)
  2006-06-11 19:31 ` Christopher Faylor
  0 siblings, 2 replies; 5+ messages in thread
From: Richard Foulk @ 2006-06-11 13:57 UTC (permalink / raw)
  To: cygwin

Give mount(1) nonexistent hosts or directories and it will complain,
but it still populates the mount table as if it succeeded.

It also always returns zero, for success or failure.


Richard

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

end of thread, other threads:[~2006-06-11 23:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-11 23:22 mount never fails ... sorta Richard Foulk
2006-06-12  0:41 ` Larry Hall (Cygwin)
  -- strict thread matches above, loose matches on Subject: below --
2006-06-11 13:57 Richard Foulk
2006-06-11 18:04 ` Larry Hall (Cygwin)
2006-06-11 19:31 ` Christopher Faylor

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