diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2000-09-29 21:53:52 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2000-09-29 21:53:52 +0000 |
commit | 795f46d9dbacc8e821cd69fba0573d813100c08d (patch) | |
tree | 8ff11a6a2a77a2e0861b2fe55fe22ee99f7c7987 /winsup/doc | |
parent | 684ee6cce2b6dcfad0bf0091c0d795106227377a (diff) | |
download | newlib-795f46d9dbacc8e821cd69fba0573d813100c08d.zip newlib-795f46d9dbacc8e821cd69fba0573d813100c08d.tar.gz newlib-795f46d9dbacc8e821cd69fba0573d813100c08d.tar.bz2 |
* pathnames.sgml: Add documentation about raw block special
devices and tape devices to the "POSIX devices" chapter.
Diffstat (limited to 'winsup/doc')
-rw-r--r-- | winsup/doc/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/doc/pathnames.sgml | 60 |
2 files changed, 58 insertions, 7 deletions
diff --git a/winsup/doc/ChangeLog b/winsup/doc/ChangeLog index eef87db..b42a1ff 100644 --- a/winsup/doc/ChangeLog +++ b/winsup/doc/ChangeLog @@ -1,3 +1,8 @@ +Fri Sep 29 23:52:00 2000 Corinna Vinschen <corinna@vinschen.de> + + * pathnames.sgml: Add documentation about raw block special + devices and tape devices to the "POSIX devices" chapter. + Fri Aug 18 15:51:06 2000 Christopher Faylor <cgf@cygnus.com> * fhandler-tut.txt: hinfo -> dtable. diff --git a/winsup/doc/pathnames.sgml b/winsup/doc/pathnames.sgml index a302e7c..7a73cc0 100644 --- a/winsup/doc/pathnames.sgml +++ b/winsup/doc/pathnames.sgml @@ -126,7 +126,7 @@ two (see <Xref Linkend="cygpath">) can be eliminated:</para> <example><title>Identity mount setup</title> <screen> -<prompt>C:\></prompt> <userinput>mount c:\ \</userinput> +<prompt>C:\></prompt> <userinput>mount c:\ /</userinput> <prompt>C:\></prompt> <userinput>mount d:\foo /foo</userinput> <prompt>C:\></prompt> <userinput>mount d:\bar /bar</userinput> <prompt>C:\></prompt> <userinput>mount e:\grill /grill</userinput> @@ -192,14 +192,60 @@ default printer with the command <command>cat filename > PRN</command> <para>There is no need to create a POSIX <filename>/dev</filename> directory as it is simulated within Cygwin automatically. It supports the following devices: <filename>/dev/null</filename>, -<filename>/dev/tty</filename> and -<filename>/dev/comX</filename> (the serial ports). +<filename>/dev/zero</filename>, <filename>/dev/tty</filename>, +<filename>/dev/ttyX</filename>, <filename>/dev/ptmx</filename>, +<filename>/dev/comX</filename> (the serial ports), +<filename>/dev/windows</filename> (the windows message queue), +<filename>/dev/random</filename> and <filename>/dev/urandom</filename>. These devices cannot be seen with the command <command>ls /dev</command> although commands such as <command>ls /dev/tty</command> work fine. -<comment> -FIXME: Are there other devices under /dev. What about the funny ones -mounted by default, such as /dev/fd1. What do they really do? -</comment> +</para> + +<para>However, on Windows NT/W2K there are different devices which are +supported but have to be created as mount points. These are the raw block +special devices and tape devices. These devices need a special handling +which is enabled through the mount points. The usage of the native Windows +device names is not sufficent. +</para> + +<para>NT/W2K supports raw block special device support for partitions +and drives. The device names for partitions is the drive letter +with leading <filename>\\.\</filename>, so the floppy would be +<filename>\\.\A:</filename>, the first partition typically +<filename>\\.\C:</filename>. Complete drives (except floppies +which are supported as partitions only) are named +<filename>\\.\PHYSICALDRIVEx</filename>. The <literal>x</literal> +is the drive number which you can check in the disk manager. +Each drive line has prepended the text "Disk x". +</para> + +<para>To access tape drives, NT/W2K uses the file name +<filename>\\.\TAPEx</filename>. For example the first installed tape device +is named <filename>\\.\tape0</filename>. +</para> + +<para>To access those devices you have to mount them and you have to +use the posix name of the device to be recognized by Cygwin. +The naming convention is simple: The name has to begin with +<filename>/dev/</filename> and the rest is as you like. The only +exception are tape devices. To identify if the tape device is +used as rewind or no-rewind device the name must not begin with +<literal>n</literal> (rewind) or has to begin with <literal>n</literal> +(no-rewind). +</para> + +<para>Some examples:</para> + +<screen> +mount -b //./A: /dev/fd0 # mount floppy as raw block special +mount -b //./physicaldrive1 /dev/hdb # mount "Disk 1" +mount -b //./tape0 /dev/st0 # mount first tape as the rewind device... +mount -b //./tape0 /dev/nst0 # ...and as the no-rewind device +</screen> + +<para>Note the usage of the <literal>-b</literal> option. It is best to +include the -b option when mounting these devices to ensure that all +file I/O is in "binary mode". </para> </sect2> |