This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Ability to specify /cygdrive mount value in setup
- From: Achim Gratz <Stromeko at nexgo dot de>
- To: cygwin at cygwin dot com
- Date: Sun, 06 Dec 2015 18:12:17 +0100
- Subject: Re: Ability to specify /cygdrive mount value in setup
- Authentication-results: sourceware.org; auth=none
- References: <20151125140420 dot 12415 at web008 dot roc2 dot bluetie dot com> <1447966985 dot 20151125232513 at yandex dot ru> <56562105 dot 5040500 at gmail dot com> <6CF2FC1279D0844C9357664DC5A08BA21BC3C3B8 at msgb09 dot nih dot gov> <20151126134221 dot GN2755 at calimero dot vinschen dot de> <87mvtnucw6 dot fsf at Rainer dot invalid> <20151206141054 dot GC17433 at calimero dot vinschen dot de> <87egeztzwg dot fsf at Rainer dot invalid>
Achim Gratz writes:
> I need cygpath to get the system directory (hint: it need not be in
> C:\Windows\System32) and cygpath delivers that directory with the
> cygdrive prefix and not /proc/cygpath prepended. IÂwouldn't mind if all
> those special directories would also be available via /proc/<whatever>,
> which means I wouldn't even need to fork cygpath for getting there.
This will get me the correct path to link to, but I still think it's
unnecessarily ugly (and took a while to cover all the possibilities of
not-so-well-formed cygdrive prefixes):
--8<---------------cut here---------------start------------->8---
CYGDRIVE="$(/usr/bin/cygpath -u C:)"
WINETC="$(/usr/bin/cygpath -S -u)/drivers/etc"
WINETC="/proc/cygdrive/${WINETC#${CYGDRIVE%c}}"
--8<---------------cut here---------------end--------------->8---
versus the hypothetical
--8<---------------cut here---------------start------------->8---
WINETC="$(/usr/bin/cygpath -S -U)/drivers/etc"
--8<---------------cut here---------------end--------------->8---
BTW, the path comprising the cygdrive prefix probably needs to be
sanitized to avoid things like
--8<---------------cut here---------------start------------->8---
$ mount -c /bla//fasel////blum//////
--8<---------------cut here---------------end--------------->8---
leaking into the wild.
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
--
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