This is the mail archive of the cygwin-patches@cygwin.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: binmode for UNC paths


On Thu, Oct 11, 2001 at 10:44:28PM +0400, egor duda wrote:
>Thursday, 11 October, 2001 Charles Wilson cwilson@ece.gatech.edu wrote:
>
>>> currently, files like '//server/share/path/to/file' are opened in
>>> text mode, if only '//server/share/path/to/' doesn't belong to any
>>> mount. mounting every share is not always possible, and otherwise
>>> there's no way to make such files to be opened in binary mode.
>>> attached patch uses 'binmode' from CYGWIN environment variable to
>>> determine default mode. Comments?
>
>CW> I thought binmode was only supposed to affect pipe behavior, not mount 
>CW> behavior -- this patch conflates the two.  Wouldn't it be better to key 
>CW> off of the mount mode for /cygdrive/ ?  We're talking about the "default 
>CW> mount mode" for non-explicit "auto-mounts" in both cases... 
>CW> "/cygdrive/x/" and "//unc/share/"
>
>this sounds like a good idea. updated patch attached.

I actually don't like either method.  binmode has two uses -- devices and
unknown disk files that are opened via redirection.

/cygdrive settings are for files accessed through the /cygdrive prefix.

Neither seems like the correct solution to me.

If this was UNIX, we wouldn't have to worry about this (and not just
because UNIX doesn't worry about binmode/textmode foolishness).  In
UNIX, you'd mount the directory.  That is always what I've suggested
for people who have this problem.

How about an extension to the mount table such that you could do something
like:

	mount -s -b --settings //server

or, even:

	mount -s -b --settings //*

where the --settings flag meant to use the binmode/execmode/whatevermode
settings for the specific file prefix?

That's probably a little bit of work, though.

I think it might be simpler to just change remote shares to use
"automode".

cgf


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