Le 29/07/2011 22:15, Corinna Vinschen a écrit :
On Jul 29 15:34, Schwarz, Konrad wrote:
Can you answer the following question:
Given a volume label, how does one figure out where the
corresponding
volume has been mounted into the Cygwin namespace?
We're not mounting volumes, we're mounting Win32 paths.
There is no direct correspondence between volumes and Cygwin
mount points.
When a person inserts removable media (USB memory stick, optical disk, ...),
Windows assigns a more-or-less random drive letter.
Cygwin automatically makes this drive letter available
under /cygdrive/ (or whatever the user has renamed /cygdrive to).
Given a (unique) volume label or disk UUID, blk_id(8) on
both Linux and Cygwin tells you the disk and partition
in /dev/sdXY format.
It does? Interesting. Where does it get the data under Cygwin?
In Linux, you can look up the mount point for device /dev/sdXY
in /proc/mounts or in the output of mount(8). Thus, given
a volume label, you can figure out where to access the files
on the volume.
How do you do that in Cygwin?
ls /cygdrive. Insert the disk. ls /cygdrive again. There's a new
directory entry now.
Or, open the "Computer" Window on your desktop.
some times ago, someone (you?) modifies cygpath to handle /dev/sdXY paths.
however, it seems there is a problem somewhere ?
v2$ uname -a
CYGWIN_NT-6.0 pcvista 1.7.9(0.237/5/3) 2011-03-29 10:10 i686 Cygwin
v2$ /usr/sbin/blkid
/dev/sda1: LABEL="BOOT500G0 (CW_VM_2)" UUID="905A77A75A77892C" TYPE="ntfs"
/dev/sda2: LABEL="DATA500G0 (DL_2)" UUID="3CBA5BBFBA5B747C" TYPE="ntfs"
/dev/sda3: LABEL="RECOVER_2" UUID="8644-3F52" TYPE="vfat"
/dev/sda4: UUID="e57dd3da-585e-4d23-9761-f714c75f32c0" SEC_TYPE="ext2"
TYPE="ext3"
/dev/sda5: UUID="138b9a25-2681-4b4f-a428-ff8dd62e18ff" TYPE="swap"
/dev/sdb1: LABEL="ESATA2T1 (MOVIES)" UUID="1E5275B85275956D" TYPE="ntfs"
/dev/sdc1: LABEL="ESATA2T2 (OAV_SERIES_BD_DOC_PSP)"
UUID="DE6EC4C36EC49625" TYPE="ntfs"
/dev/sdd1: LABEL="SATA500G0 (BOOT_CW_VM)" UUID="905A77A75A77892C"
TYPE="ntfs"
/dev/sdd2: LABEL="SATA500G1 (DL)" UUID="4024F55724F55080" TYPE="ntfs"
/dev/sdd3: LABEL="RECOVER" UUID="8644-3F52" TYPE="vfat"
/dev/sde1: LABEL="SATA500G2 (EMULE_NORTON)" UUID="886606C66606B54A"
TYPE="ntfs"
/dev/sdi1: LABEL="USB500G1 (MM_OLD_TUHS)" UUID="4CA87E8AA87E7276"
TYPE="ntfs"
/dev/sdj1: LABEL="USB1T1 (REPS)" UUID="FEB2DCA1B2DC5FA7" TYPE="ntfs"
v2$ cygpath -w $(/usr/sbin/blkid | cut -d: -f1
\\.\E:
\\.\G:
\\.\H:
\\.\STORAGE#Volume#1&19f7e59c&0&Signature1A08653EOffset320053F800Length12996C000#{7f108a28-9833-4b3b-b780-2c6b5fa5c062}
\\.\STORAGE#Volume#1&19f7e59c&0&Signature1A08653EOffset3329EB3600Length11A5CA00#{7f108a28-9833-4b3b-b780-2c6b5fa5c062}
\\.\I:
\\.\J:
\\.\C:
\\.\D:
E:0
E:1
E:5
E:6
sda1..5 ok
sdb1, sdc1, sdd1..2 ok
sdd3 ko E:0 instead of R:
sde1 ko E:1 instead of S:
sdi1 ko E:2 instead of F:
sdj1 ko E:3 instead of K:
any ideas ?
part of cygcheck -s :
Cygwin Configuration Diagnostics
Current System Time: Sun Aug 07 01:38:51 2011
Windows Vista Home Premium Ver 6.0 Build 6002 Service Pack 2
Path: C:\cygwin\home\Cyrille\bin
C:\cygwin\usr\local\bin
C:\cygwin\bin
C:\Windows\system32
C:\Windows
C:\Windows\system32\wbem
C:\cygwin\lib\lapack
C:\cygwin\usr\pkg\bin
C:\cygwin\opt\wbin
Output from C:\cygwin\bin\id.exe
UID: 1000(Cyrille) GID: 513(None)
513(None) 0(root) 544(Administrateurs)
545(Utilisateurs)
SysDir: C:\Windows\system32
WinDir: C:\Windows
USER = 'Cyrille'
PWD = '/home/Cygille'
CYGWIN = 'nodosfilewarning'
HOME = '/home/Cyrille'
obcaseinsensitive set to 1
Cygwin installations found in the registry:
System: Key: 50a84960ed2ca80d Path: C:\cygwin
System: Key: c5e39b7a9d22bafb Path: C:\cygwin
System: Key: c5e39b7a9d22bafb?"?? Path: C:\cygwin
System: Key: a8fb4064ab2b92ac Path: C:\Windows (ORPHANED)
System: Key: 10b99c96e3dd575f Path: C:\Users\Cyrille\Temp (ORPHANED)
c: hd NTFS 238469Mb 67% CP CS UN PA FC SATA500G0 (BOOT_CW_VM)
d: hd NTFS 204799Mb 95% CP CS UN PA FC SATA500G1 (DL)
e: hd NTFS 204800Mb 55% CP CS UN PA FC BOOT500G0 (CW_VM_2)
f: hd NTFS 476936Mb 87% CP CS UN PA FC USB500G1 (MM_OLD_TUHS)
g: hd NTFS 204799Mb 91% CP CS UN PA FC DATA500G0 (DL_2)
h: hd FAT32 33659Mb 17% CP UN RECOVER_2
i: hd NTFS 1907726Mb 100% CP CS UN PA FC ESATA2T1 (MOVIES)
j: hd NTFS 1907726Mb 99% CP CS UN PA FC ESATA2T2
(OAV_SERIES_BD_DOC_PSP)
k: hd NTFS 953866Mb 98% CP CS UN PA FC USB1T1 (REPS)
o: cd N/A N/A
r: hd FAT32 33658Mb 95% CP UN RECOVER
s: hd NTFS 476936Mb 77% CP CS UN PA FC SATA500G2 (EMULE_NORTON)
v: cd N/A N/A
w: cd N/A N/A
x: fd N/A N/A
y: fd N/A N/A
z: fd N/A N/A
C:\cygwin / system binary,auto
C:\cygwin-legacy /legacy system binary
C:/cygwin/bin /usr/bin system binary
C:/cygwin/lib /usr/lib system binary
cygdrive prefix /cygdrive user binary,auto
...
Regards,
Cyrille Lefevre
--
mailto:cyrille.lefevre-li...@laposte.net
--
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