From 06d60a915daf597a0549337ee97cce3ce80612a3 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 13 Feb 2009 10:13:28 +0000 Subject: [PATCH] * pathnames.sgml: Add a cygdrive section. --- winsup/doc/ChangeLog | 4 +++ winsup/doc/pathnames.sgml | 71 ++++++++++++++++++++++++++++++--------- 2 files changed, 60 insertions(+), 15 deletions(-) diff --git a/winsup/doc/ChangeLog b/winsup/doc/ChangeLog index d1be390d9..5f24cbf24 100644 --- a/winsup/doc/ChangeLog +++ b/winsup/doc/ChangeLog @@ -1,3 +1,7 @@ +2009-02-13 Corinna Vinschen + + * pathnames.sgml: Add a cygdrive section. + 2009-02-13 Corinna Vinschen * pathnames.sgml: Replace "binmode" with new "binary" output of mount. diff --git a/winsup/doc/pathnames.sgml b/winsup/doc/pathnames.sgml index 5ee5faa11..e89f1858f 100644 --- a/winsup/doc/pathnames.sgml +++ b/winsup/doc/pathnames.sgml @@ -88,7 +88,12 @@ posix=[0|1]. The meaning of the options is as follows. (default). -Normally, files ending in certain extensions (.exe, .com, .bat, .btm, +While normally the execute permission bits are used to evaluate +executability, this is not possible on filesystems which don't support +permissions at all (like FAT/FAT32), or if ACLs are ignored on filesystems +supporting them (see the aforementioned acl mount option). +In these cases, the following heuristic is used to evaluate if a file is +executable: Files ending in certain extensions (.exe, .com, .bat, .btm, .cmd) are assumed to be executable. Files whose first two characters begin with '#!' are also considered to be executable. The exec option is used to instruct Cygwin that the @@ -103,11 +108,14 @@ opposite of these options is the notexec option, which means that no files should be marked as executable under that mount point. -Note that nouser mount points are not overridable by a later call -to mount. This is only possible for user mount points. -Mount points given in /etc/fstab are by default nouser -mount points, unless you specify the option user. In contrast, all mount -points in the user specific fstab file are user mount points. +nouser mount points are not overridable by a later +call to mount. +Mount points given in /etc/fstab are by default +nouser mount points, unless you specify the option +user. This allows the administrator to set certain +paths so that they are not overridable by users. In contrast, all mount +points in the user specific fstab file are user mount +points. The fifth and sixth field are ignored. They are so far only specified to keep a Linux-like fstab file layout. @@ -180,15 +188,48 @@ points will disappear as soon as your last Cygwin process ends. See and for more information. -Whenever Cygwin cannot use any of the existing mounts to convert -from a particular Win32 path to a POSIX one, Cygwin will -automatically default to an imaginary mount point under the default POSIX -path /cygdrive. For example, if Cygwin accesses -Z:/foo and the Z drive is not currently in the -mount table, then Z:/ would be automatically -converted to /cygdrive/Z. The default -prefix of /cygdrive may be changed in the fstab file -as outlined above. + + +The cygdrive path prefix + +As already outlined in , you can +access arbitary drives on your system by using the cygdrive path prefix. +The default value for this prefix is /cygdrive, and +a path to any drive can be constructed by using the cygdrive prefix and +appending the drive letter as subdirectory, like this: + + + bash$ ls -l /cygdrive/f/somedir + + +This lists the content of the directory F:\somedir. + +The cygdrive prefix is a virtual directory under which all drives +on a system are subsumed. The mount options of the cygdrive prefix is +used for all file access through the cygdrive prefixed drives. For instance, +assuming the cygdrive mount options are binary,posix=0, +then any file /cygdrive/x/file will be opened in +binary mode by default (mount option binary, and the case +of the filename doesn't matter (mount option posix=0. + + +The cygdrive prefix may be changed in the fstab file as outlined above. +Please note that you must not use the cygdrive prefix for any other mount +point. For instance this: + + + none /cygdrive cygdrive binary 0 0 + D: /cygdrive/d somefs text 0 0 + + +will not make file access using the /mnt/d path prefix suddenly using +textmode. If you want to mount any drive explicitely in another mode than +the cygdrive prefix, use a distinct path prefix: + + + none /cygdrive cygdrive binary 0 0 + D: /mnt/d somefs text 0 0 +