delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/02/04/09:51:00

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; q=dns; s=default; b=qJOM7y6k8bA3vn88
pA+KDY42QtWZN4HwcRv/UIYYAztNXmNKMHQy98GPSq7n9/Kt4j2tYmz1c/sfhrFj
kJGxKCItDPjhCauIwpX43wH60c3GKFbS0dTBXTIRl2s/193qYYP7cGDDiqE349Ro
7Oz7AxufNht5Rh8u8tXt/nCUzg0=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; s=default; bh=lX+D/MUtveE3LKqgiGyKvK
5bquo=; b=p7CUM6DH3/DlygUsv88eX+Lu/cViEBF7ri6PDUAiINvTB2uMk5f/Lz
y7XaMtcCXLlPB/YWFZYmQCLFkhMyZsgSvFMOPdTtid5vD6PAUDqogSGznA5PaP2b
XuIUgGfkMtkdma512Nn5C5GVtnsOGoA1cbWuzrTpfIbWxkMb3ZPOo=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=1.2 required=5.0 tests=BAYES_20,FREEMAIL_FROM,KAM_THEBAT,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 spammy=H*M:yandex, H*UA:Bat!, H*r:present, H*F:D*yandex.ru
X-HELO: forward4h.cmail.yandex.net
Authentication-Results: smtp3m.mail.yandex.net; dkim=pass header.i=@yandex.ru
X-Yandex-Suid-Status: 1 0,1 0
Date: Sat, 4 Feb 2017 17:39:39 +0300
From: Andrey Repin <anrdaemon AT yandex DOT ru>
Reply-To: cygwin AT cygwin DOT com
Message-ID: <45557206.20170204173939@yandex.ru>
To: Rustam <rustamabd AT gmail DOT com>, cygwin AT cygwin DOT com
Subject: Re: Is it OK to mount cygdrive on / ?
In-Reply-To: <CAPzS6u_N5qnKOYJejdxfBWCzbc3tn=iyqEEyP5E_Vwp7RCC-KA@mail.gmail.com>
References: <CAPzS6u_N5qnKOYJejdxfBWCzbc3tn=iyqEEyP5E_Vwp7RCC-KA AT mail DOT gmail DOT com>
MIME-Version: 1.0
X-IsSubscribed: yes

Greetings, Rustam!

> I've added an extra / mountpoint in /etc/fstab in order to be able to
> access C: without /cygdrive like this:

> none /cygdrive cygdrive binary,posix=0,user 0 0
> none /         cygdrive binary,posix=0,user 0 0

Only one cygdrive mount is effective.

> It seems to work, I can access the C: drive with just /c.

> But normally an "ls /cygdrive" should list the drives, whereas "ls /"
> lists the contents of the Cygwin root. So it seems there are now two
> root mountpoints overlaying each other.

> So I was wondering if my approach is if this is technically undefined
> behavior and might conceivably break something or is it OK (less the
> drive listing limitation mentioned above).

Undefined behavior, but only because you're using two mount entries at once.
Accessing drive letters directly from inside Cygwin is often considered a grey area.
Too much may happen on this border. You have to clearly understand, how Cygwin
interact with other system, to avoid issues.
If you want to access Windows path, recommended route lies through the use of
cygpath utility to convert native paths to the Cygwin scheme. Et vice versa.


-- 
With best regards,
Andrey Repin
Saturday, February 4, 2017 17:17:15

Sorry for my terrible english...


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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