delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/03/17/13:22:51

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-9.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <4BA11DB7.8030804@redhat.com>
Date: Wed, 17 Mar 2010 12:21:43 -0600
From: Eric Blake <eblake AT redhat DOT com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100301 Fedora/3.0.3-1.fc12 Lightning/1.0b1 Thunderbird/3.0.3
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: cygwin 1.7: why there is a directory E/cygwin/dev in the tree of cygwin ?
References: <485797401003160836l4a74aee2q527fa059765502a9 AT mail DOT gmail DOT com> <20100316154432 DOT GB18610 AT ednor DOT casa DOT cgf DOT cx> <416096c61003160854v4f18669ep57635447a8b55061 AT mail DOT gmail DOT com> <4B9FE12F DOT 4020008 AT hones DOT org DOT uk> <485797401003170119v484779f0p28304ffe1491951 AT mail DOT gmail DOT com>
In-Reply-To: <485797401003170119v484779f0p28304ffe1491951@mail.gmail.com>
X-IsSubscribed: yes
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

--------------enigBFEC81F7794A78A8C6186C39
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 03/17/2010 02:19 AM, rolandc wrote:
> I do not understand why the postinstall script bash.sh is so complex
>=20
>     DEVDIR=3D"$(cygpath -au "C:/$(cygpath -am /dev/)" | sed 's|/c/\(.\):/=
|/\1/|')"
>     mkdir -p "$DEVDIR" || result=3D1
>=20
> it would be simple (too simple?) to
>     mkdir -p /dev || result=3D1

Yes, it would be too simple.  /dev already exists, so the mkdir would
fail to do anything useful.  We REALLY want to create the underlying
Windows directory at the same location at where /dev would be mounted,
and to do that, we really do want to know the windows location (drive
letter and all) of /.  Then, by using mkdir of that fancy windows path
that happens to live at the same place as where /dev normally resolves
to, then we can guarantee that /dev/stdin gets created as an actual
symlink in the windows heirarchy (since it does NOT resolve via the /dev
magic mount point), and that tab-completion can see any contents placed
into the windows counterpart directory.

--=20
Eric Blake   eblake AT redhat DOT com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


--------------enigBFEC81F7794A78A8C6186C39
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkuhHbcACgkQ84KuGfSFAYBUugCeKBqJtshETMcE0C1TQItoXMJX
Q5MAn2W7WhJcGAeA70JxkrR83bn/4KmH
=awtE
-----END PGP SIGNATURE-----

--------------enigBFEC81F7794A78A8C6186C39--

- Raw text -


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