From 795f46d9dbacc8e821cd69fba0573d813100c08d Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 29 Sep 2000 21:53:52 +0000 Subject: * pathnames.sgml: Add documentation about raw block special devices and tape devices to the "POSIX devices" chapter. --- winsup/doc/ChangeLog | 5 ++++ winsup/doc/pathnames.sgml | 60 +++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 58 insertions(+), 7 deletions(-) diff --git a/winsup/doc/ChangeLog b/winsup/doc/ChangeLog index eef87dbf3..b42a1ff93 100644 --- a/winsup/doc/ChangeLog +++ b/winsup/doc/ChangeLog @@ -1,3 +1,8 @@ +Fri Sep 29 23:52:00 2000 Corinna Vinschen + + * 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 * fhandler-tut.txt: hinfo -> dtable. diff --git a/winsup/doc/pathnames.sgml b/winsup/doc/pathnames.sgml index a302e7c96..7a73cc080 100644 --- a/winsup/doc/pathnames.sgml +++ b/winsup/doc/pathnames.sgml @@ -126,7 +126,7 @@ two (see ) can be eliminated: Identity mount setup -C:\> mount c:\ \ +C:\> mount c:\ / C:\> mount d:\foo /foo C:\> mount d:\bar /bar C:\> mount e:\grill /grill @@ -192,14 +192,60 @@ default printer with the command cat filename > PRN There is no need to create a POSIX /dev directory as it is simulated within Cygwin automatically. It supports the following devices: /dev/null, -/dev/tty and -/dev/comX (the serial ports). +/dev/zero, /dev/tty, +/dev/ttyX, /dev/ptmx, +/dev/comX (the serial ports), +/dev/windows (the windows message queue), +/dev/random and /dev/urandom. These devices cannot be seen with the command ls /dev although commands such as ls /dev/tty work fine. - -FIXME: Are there other devices under /dev. What about the funny ones -mounted by default, such as /dev/fd1. What do they really do? - + + +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. + + +NT/W2K supports raw block special device support for partitions +and drives. The device names for partitions is the drive letter +with leading \\.\, so the floppy would be +\\.\A:, the first partition typically +\\.\C:. Complete drives (except floppies +which are supported as partitions only) are named +\\.\PHYSICALDRIVEx. The x +is the drive number which you can check in the disk manager. +Each drive line has prepended the text "Disk x". + + +To access tape drives, NT/W2K uses the file name +\\.\TAPEx. For example the first installed tape device +is named \\.\tape0. + + +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 +/dev/ 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 +n (rewind) or has to begin with n +(no-rewind). + + +Some examples: + + +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 + + +Note the usage of the -b option. It is best to +include the -b option when mounting these devices to ensure that all +file I/O is in "binary mode". -- cgit v1.2.3