New output from mount.exe

Parker, Ron
Wed Apr 4 13:41:00 GMT 2001

> From: Earnie Boyd [ ]

> Christopher Faylor wrote:
> > 
> > On Wed, Apr 04, 2001 at 10:32:49AM +0900, Kazuhiro Fujieda wrote:

> > >Would you like to go a step further?
> > >
> > >Corinna's idea "just printing slashes" can reduce chances for
> > >newbies to fail to escape backslashes on creating a new entry
> > >with the `mount' command. This would be fine.
> > 
> > It would also lie to the user about what was happening in the Cygwin
> > internals.  Cygwin stores these paths as c:\foo not c:/foo. 
>  I don't see
> > any reason to mislead anyone about what Cygwin is really doing.
> > 
> I don't see that change would mislead anyone.  I also don't see why it
> is stored in the mount table with back slashes.  It would be 
> beneficial
> to everyone to see it as forward slashes so as not to make the obvious
> error that this discussion is trying to avoid.  This change will cut
> down on the mail to the Cygwin list and we all would very much
> appreciate that.

While I understand the desire to have all paths displayed with slashes,
where does the argument end? Should we escape spaces that may occur in the
mount names?  Should we quote them?  How many times should we escape them?
Once for the shell? Twice for a shell plus the subprocess that the path is
passed to?  I have hashed this one over and over in my own mind on many
occasions because I often parse the output of programs like mount to use as
input into scripts or other programs.

I believe that the backslashes used for c:\foo and similar entries in the
mount table emphasize that it is a Windows style path and not a cygwin path.
Outputting c:/foo could just as easily lead to the naive user inferring that
c:/foo is a legal cygwin path.

I think we should retain the simplicity of the change that Chris made.  

If more extensive modifications are planned for the future, then we can
discuss other changes, like escaping spaces in the mount location and so
forth.  Alternatively, if you feel strongly enough about a change, submit a
patch (tm).

More information about the Cygwin-developers mailing list