Mail Archives: cygwin/2001/01/24/10:36:29
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 AT rfk DOT 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
- Raw text -