Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Wed, 1 Sep 2004 18:50:10 -0400
From: Christopher Faylor <cgf-no-personal-reply-please@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: c:/ seems to be accessed in binary even if cygwin is configured as textmode by default (documentation alert)
Message-ID: <20040901225010.GI9891@trixie.casa.cgf.cx>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <6.1.2.0.0.20040831193832.01cc4f70@172.16.0.2> <6.1.0.6.0.20040831135114.033e8c58@pop.prospeed.net> <6.1.2.0.0.20040901091733.01b7e768@172.16.0.2> <6.1.2.0.0.20040901105801.01cebc40@172.16.0.2> <20040901095311.GZ17670@cygbert.vinschen.de> <20040901142808.GA9891@trixie.casa.cgf.cx> <6.1.2.0.0.20040901163643.01dcfef8@172.16.0.2> <20040901150213.GE9891@trixie.casa.cgf.cx> <6.1.2.0.0.20040901171344.01d8db60@172.16.0.2>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <6.1.2.0.0.20040901171344.01d8db60@172.16.0.2>
User-Agent: Mutt/1.4.1i

On Wed, Sep 01, 2004 at 05:34:52PM +0200, Arnaud Mouiche wrote:
>At 17:02 01/09/2004, Christopher Faylor wrote:
>>On Wed, Sep 01, 2004 at 04:40:43PM +0200, Arnaud Mouiche wrote:
>>>well. c: is binary
>>>
>>>here a bug.
>>>cygpath -M c:/foo returns
>>>
>>>>> cygpath: file 'c:/foo' - No error
>>>
>>>looking at CVS code and strace, flags are set to zero instead of 0xa; the
>>>file is nor binary nor text
>>
>>"0xa"?  Why would the code use an absolute hex value?
>
>sorry
>0xa is the flags return by strace when checking a binary mounted file like. 
>of course, strace dosn't know the #define or enum strings
>
>
>for example,
>run:  strace cygpath -M /usr/X11R6/lib/X11/fonts/util/map-KOI8-R (which is 
>mounted a binary)
>[....]
>282  712265 [main] cygpath 404 mount_info::conv_to_win32_path: src_path 
>/usr/X11R6/lib/X11/fonts/util/map-KOI8-R, dst 
>C:\cygwin\usr\X11R6\lib\X11\fonts\util\map-KOI8-R, flags >>>>> 0xA <<<<<<, 
>rc 0
>[....]
>
>in fact 0xA = PATH_BINARY + (something else) , where PATH_BINARY =0x2
>
>we have following calls
>cygpath -> cygwin_internal(CW_GET_BINMODE) -> path_conv::check which set 
>path_flags to 0xA for binary, and then returns O_BINARY or O_TEXT to 
>cygpath, depending of the mode.
>
>for c:/foo, path_conv::check  set path_flags to zero and 
>cygwin_internal(CW_GET_BINMODE) returns zero instead of O_BINARY or O_TEXT

On reflection, since cygpath -M is supposed to report on the mount type
(binmode or textmode) of a given path and c:/foo does not refer to a
mounted path, it seems like it is well within its rights to return
an error.

However, again, if you want to provide a patch, it will be thoughtfully
considered.

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/

