summaryrefslogtreecommitdiff
path: root/lib/libutil/scsi.3
diff options
context:
space:
mode:
authorMike Pechkin <mpech@cvs.openbsd.org>2002-05-01 08:03:31 +0000
committerMike Pechkin <mpech@cvs.openbsd.org>2002-05-01 08:03:31 +0000
commit41434dbdbf3099a023505b5b3915bf4d9b778ee1 (patch)
tree1ca936fb3301ad4347fcc3a38fd2c83e87a15817 /lib/libutil/scsi.3
parent04e9f1abe6384e852ca0207d882814dab9237dd4 (diff)
o) start new sentence on a new line;
o) always close .Bl tags; o) fix usage of .Xr; millert@ ok
Diffstat (limited to 'lib/libutil/scsi.3')
-rw-r--r--lib/libutil/scsi.342
1 files changed, 24 insertions, 18 deletions
diff --git a/lib/libutil/scsi.3 b/lib/libutil/scsi.3
index 28d372a11f4..2a71b75947c 100644
--- a/lib/libutil/scsi.3
+++ b/lib/libutil/scsi.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: scsi.3,v 1.6 2000/11/10 00:06:27 deraadt Exp $
+.\" $OpenBSD: scsi.3,v 1.7 2002/05/01 08:03:30 mpech Exp $
.\" Copyright (c) 1994 HD Associates (hd@world.std.com)
.\" All rights reserved.
.\"
@@ -79,7 +79,8 @@ use the SCIOCCOMMAND
of the SCSI subsystem
to provide user level access to SCSI commands.
The programmer must know the SCSI CDB (Command Descriptor
-Block) to perform the desired command. These functions assist in
+Block) to perform the desired command.
+These functions assist in
building up the CDB, submitting it to the SCSI subsystem, and decoding
the result.
.Pp
@@ -89,7 +90,8 @@ command before using the library directly - simple programs are
best implemented as scripts using that facility.
.Pp
To provide for security,
-not all devices accept the SCIOCCOMAND ioctl. It is accepted by the
+not all devices accept the SCIOCCOMAND ioctl.
+It is accepted by the
control device for tape drives, partition D for disk drives, partition C
for CD ROM drives, and any "unknown" device.
The "super scsi"
@@ -145,8 +147,8 @@ determined by the
argument.
.Pp
.Fr buf
-is the data buffer used during the SCSI data phase. If it is NULL it
-is allocated via malloc and
+is the data buffer used during the SCSI data phase.
+If it is NULL it is allocated via malloc and
.Ar scsireq->databuf
is set to point to the newly allocated memory.
.Pp
@@ -171,17 +173,17 @@ indicates a data out phase (a transfer out of the user buffer).
.Pp
.Fr fmt
is a CDB format specifier used to build up the SCSI CDB.
-This text string is made up of a list of field specifiers. Field
-specifiers specify the value for each CDB field (including indicating
+This text string is made up of a list of field specifiers.
+Field specifiers specify the value for each CDB field (including indicating
that the value be taken from the next argument in the
variable argument list), the width
-of the field in bits or bytes, and an optional name. White space is
-ignored, and the pound sign ('#') introduces a comment that ends at the
-end of the current line.
+of the field in bits or bytes, and an optional name.
+White space is ignored, and the pound sign ('#') introduces a comment that
+ends at the end of the current line.
.Pp
The optional name is the first part of a field specifier and
-is in curly braces. The text in curly braces in this example are
-the names:
+is in curly braces.
+The text in curly braces in this example are the names:
.Bd -literal -offset indent
.Fr "{PS} v:b1 {Reserved} 0:b1 {Page Code} v:b6 # Mode select page"
.Ed
@@ -277,8 +279,8 @@ described above in
.Fn scsireq_decode .
.Pp
.Fn scsireq_encode
-encodes the data phase section of the structure. The encoding is
-handled identically as the encoding of the CDB structure by
+encodes the data phase section of the structure.
+The encoding is handled identically as the encoding of the CDB structure by
.Fn scsireq_build
.Pp
.Fn scsireq_enter
@@ -330,11 +332,14 @@ returns the result of the ioctl call.
.Xr scsi 4 ,
.Xr scsi 8
.Sh BUGS
-This only works completely for the 1542C. The host adapter code
+This only works completely for the 1542C.
+The host adapter code
that sets up the residual amount of data transfer has to be added
-to each individual adapter. This library is usable on the other
+to each individual adapter.
+This library is usable on the other
host adapters; however, the SCSI driver pretends that the proper
-amount of data is always transferred. If you have an Adaptec 174x
+amount of data is always transferred.
+If you have an Adaptec 174x
and can hack contact dufault@hda.com and you can have the code to
calculate residual data for the 174x series to integrate and test.
.Sh HISTORY
@@ -342,7 +347,8 @@ Many systems have comparable interfaces to permit a user to construct a
SCSI command in user space.
.Pp
The data structure is almost identical to the SGI /dev/scsi data
-structure. If anyone knows the name of the authors it should
+structure.
+If anyone knows the name of the authors it should
go here; Peter Dufault first read about it in a 1989 Sun Expert magazine.
.Pp
Peter Dufault implemented a clone of SGI's interface in 386bsd that