delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/09/01/18:49:29

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Wed, 1 Sep 2004 18:50:10 -0400
From: Christopher Faylor <cgf-no-personal-reply-please AT cygwin DOT com>
To: cygwin AT cygwin DOT 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 AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <6 DOT 1 DOT 2 DOT 0 DOT 0 DOT 20040831193832 DOT 01cc4f70 AT 172 DOT 16 DOT 0 DOT 2> <6 DOT 1 DOT 0 DOT 6 DOT 0 DOT 20040831135114 DOT 033e8c58 AT pop DOT prospeed DOT net> <6 DOT 1 DOT 2 DOT 0 DOT 0 DOT 20040901091733 DOT 01b7e768 AT 172 DOT 16 DOT 0 DOT 2> <6 DOT 1 DOT 2 DOT 0 DOT 0 DOT 20040901105801 DOT 01cebc40 AT 172 DOT 16 DOT 0 DOT 2> <20040901095311 DOT GZ17670 AT cygbert DOT vinschen DOT de> <20040901142808 DOT GA9891 AT trixie DOT casa DOT cgf DOT cx> <6 DOT 1 DOT 2 DOT 0 DOT 0 DOT 20040901163643 DOT 01dcfef8 AT 172 DOT 16 DOT 0 DOT 2> <20040901150213 DOT GE9891 AT trixie DOT casa DOT cgf DOT cx> <6 DOT 1 DOT 2 DOT 0 DOT 0 DOT 20040901171344 DOT 01d8db60 AT 172 DOT 16 DOT 0 DOT 2>
Mime-Version: 1.0
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019