delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/09/01/11:36:06

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
Message-Id: <6.1.2.0.0.20040901171344.01d8db60@172.16.0.2>
X-Sender: arnaud DOT mouiche AT 172 DOT 16 DOT 0 DOT 2
Date: Wed, 01 Sep 2004 17:34:52 +0200
To: cygwin AT cygwin DOT com, cygwin AT cygwin DOT com
From: Arnaud Mouiche <arnaud DOT mouiche AT inventel DOT fr>
Subject: Re: c:/ seems to be accessed in binary even if cygwin is configured as textmode by default (documentation alert)
In-Reply-To: <20040901150213.GE9891@trixie.casa.cgf.cx>
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>
Mime-Version: 1.0
X-IsSubscribed: yes

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

arnaud



>PTC, but not a P that uses an absolute hex value.
>
>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/


--
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