delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/06/05/11:24:33

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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, 5 Jun 2002 11:24:22 -0400
From: Christopher Faylor <cgf-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: More 1.3.11 road show
Message-ID: <20020605152422.GI15167@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20020605034752 DOT GA32174 AT redhat DOT com> <12825541747 DOT 20020605171024 AT syntrex DOT com>
Mime-Version: 1.0
In-Reply-To: <12825541747.20020605171024@syntrex.com>
User-Agent: Mutt/1.3.23.1i

On Wed, Jun 05, 2002 at 05:10:24PM +0200, Pavel Tsekov wrote:
>[snip]
>CF> What this means is that if you do something like this:
>
>c:\>>pwd > d:\tmp\foo
>
>CF> and you've previously done a
>
>CF> mount -b d:\tmp /dtmp
>
>CF> then the line endings in d:\tmp\foo will be \n rather than \r\n.
>
>I've done some simple tests and it works for me. One question though:
>
>Consider this situation - I have drive C mounted on /cygdrive/c/ as
>binary and I have C:\Temp mounted on /ctmp as text. Now redirecting the
>output of 'pwd' to a file in /cygdrive/c/Temp/ gives me UNIX line
>endings, while redirecting it to /ctmp gives me DOS line endings. Is
>this intended ? Shouldn't the /ctmp mount override the settings for
>/cygdrive/c/Temp ?

No.  You can mount the same dos directory/file with multiple posix paths
and use different settings for each posix path.  When you access the posix
path in cygwin, the setting of the specific posix path will be used.  /cygdrive
is just another posix path in this case.

FWIW, this question has little to do with the issue you have tested.  If
you're using /cygdrive/c, you're probably inside a bash shell.
Redirection inside of shells has always correctly set binmode/textmode
based on mount, afaik.

It was the case of redirection from the dos command line that the recent
changes were supposed to handle.  Since the only information available
to cygwin at startup is (essentially) the dos path, cygwin has to guess
at the posix path associated with the dos path.  It will use /cygdrive/x
only if the dos path isn't specifically found in the mount table.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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