diff options
author | ru <ru@FreeBSD.org> | 2003-06-28 23:53:39 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2003-06-28 23:53:39 +0000 |
commit | 348e423dd913fabaea56f15eecca3d155723ee08 (patch) | |
tree | 119cebb3a669617b213ec04fe871163ae082cfb1 /share/man/man4/ch.4 | |
parent | e4f0eb6b17525e227a1bc1d660ab253005530425 (diff) | |
download | FreeBSD-src-348e423dd913fabaea56f15eecca3d155723ee08.zip FreeBSD-src-348e423dd913fabaea56f15eecca3d155723ee08.tar.gz |
Hiten's patchset for section four manpages, slightly edited by me.
Diffstat (limited to 'share/man/man4/ch.4')
-rw-r--r-- | share/man/man4/ch.4 | 137 |
1 files changed, 91 insertions, 46 deletions
diff --git a/share/man/man4/ch.4 b/share/man/man4/ch.4 index de67026..9bad5b2 100644 --- a/share/man/man4/ch.4 +++ b/share/man/man4/ch.4 @@ -40,7 +40,8 @@ driver provides support for a .Em SCSI media changer. It allows many slots of media to be multiplexed between -a number of drives. The changer device may optionally be equipped +a number of drives. +The changer device may optionally be equipped with a bar code reader, which reads label information attached to the media. .Pp @@ -75,10 +76,11 @@ so a large number of configured devices is cheap. has included the driver). .Sh IOCTLS User mode programs communicate with the changer driver through a -number of ioctls which are described below. Changer element addresses +number of ioctls which are described below. +Changer element addresses used in the communication between the kernel and the changer device are -mapped to zero-based logical addresses. Element types are specified -as follows: +mapped to zero-based logical addresses. +Element types are specified as follows: .Bl -tag -width CHET_MT .It Dv CHET_MT Medium transport element (picker). @@ -99,9 +101,11 @@ in the header file .Pp .Bl -tag -width CHIOEXCHANGE .It Dv CHIOMOVE -.Pq Li "struct changer_move" -Move a medium from one element to another (\fBMOVE MEDIUM\fR) using -the current picker. The source and destination elements are specified +.Pq Vt "struct changer_move" +Move a medium from one element to another +.Pq Sy "MOVE MEDIUM" +using the current picker. +The source and destination elements are specified in a changer_move structure, which includes at least the following fields: .Bd -literal -offset indent @@ -111,17 +115,24 @@ u_int cm_totype; /* element type to move to */ u_int cm_tounit; /* logical unit of to element */ u_int cm_flags; /* misc. flags */ .Ed -If the \fBCM_INVERT\fR in the \fBcm_flags\fR field is set, the medium +If the +.Dv CM_INVERT +in the +.Va cm_flags +field is set, the medium changer is instructed to flip the medium while moving it. .It Dv CHIOEXCHANGE -.Pq Li "struct changer_exchange" +.Pq Vt "struct changer_exchange" Move the medium located in the source element to the first destination element, and move the medium that had been in the first destination -element to the second destination element. In case of a simple +element to the second destination element. +In case of a simple exchange, the source and second destination elements should be the -same. The current picker is used to perform the operation. The -addresses of the affected elements is specified to the ioctl in a -changer_exchange structure which includes at least the following +same. +The current picker is used to perform the operation. +The addresses of the affected elements is specified to the ioctl in a +.Vt changer_exchange +structure which includes at least the following fields: .Bd -literal -offset indent u_int ce_srctype; /* element type of source */ @@ -132,32 +143,41 @@ u_int ce_sdsttype; /* element type of second destination */ u_int ce_sdstunit; /* logical unit of second destination */ u_int ce_flags; /* misc. flags */ .Ed -In \fBce_flags\fR, \fBCM_INVERT1\fR and/or \fBCM_INVERT2\fR may be set +In +.Va ce_flags , +.Dv CM_INVERT1 +and/or +.Dv CM_INVERT2 +may be set to flip the first or second medium during the exchange operation, respectively. .Pp -\fIThis operation is untested.\fR +.Em This operation is untested . .It Dv CHIOPOSITION -.Pq Li "struct changer_position" -Position the current picker in front of the specified element. The -element is specified with a changer_position structure, which includes +.Pq Vt "struct changer_position" +Position the current picker in front of the specified element. +The element is specified with a changer_position structure, which includes at least the following elements: .Bd -literal -offset indent u_int cp_type; /* element type */ u_int cp_unit; /* logical unit of element */ u_int cp_flags; /* misc. flags */ .Ed -The \fBcp_flags\fR field may be set to \fBCP_INVERT\fR to invert the -picker during the operation. +The +.Va cp_flags +field may be set to +.Dv CP_INVERT +to invert the picker during the operation. .It Dv CHIOGPICKER -.Pq Li "int" +.Pq Vt int Return the logical address of the current picker. .It Dv CHIOSPICKER -.Pq Li "int" +.Pq Vt int Select the picker specified by the given logical address. .It Dv CHIOGPARAMS -.Pq Li "struct changer_params" -Return the configuration parameters for the media changer. This ioctl +.Pq Vt "struct changer_params" +Return the configuration parameters for the media changer. +This ioctl fills the changer_params structure passed by the user with at least the following fields: .Bd -literal -offset indent @@ -168,27 +188,36 @@ u_int cp_ndrives; /* number of drives */ .Ed .Pp This call can be used by applications to query the dimensions of -the jukebox before using the \fBCHIGSTATUS\fR +the jukebox before using the +.Dv CHIGSTATUS ioctl to query the jukebox' status. .It Dv CHIOIELEM -Perform the \fBINITIALIZE ELEMENT STATUS\fR call on the media changer -device. This forces the media changer to update its internal status -information with respect to loaded media. It also scans any barcode -labels provided that it has a label reader. The +Perform the +.Sy INITIALIZE ELEMENT STATUS +call on the media changer device. +This forces the media changer to update its internal status +information with respect to loaded media. +It also scans any barcode labels provided that it has a label reader. +The .Nm driver's status is not affected by this call. .It Dv CHIOGSTATUS -.Pq Li "struct changer_element_status_request" -Perform the \fBREAD ELEMENT STATUS\fR call on the media changer -device. This call reads the element status information of the media -changer and converts it to an array of \fBchanger_element_status\fR +.Pq Vt "struct changer_element_status_request" +Perform the +.Sy READ ELEMENT STATUS +call on the media changer device. +This call reads the element status information of the media +changer and converts it to an array of +.Vt changer_element_status structures. .Pp With each call to .Dv CHIOGSTATUS , the status of one or more elements of one type may be queried. .Pp -The application passes a changer_element_status_request structure to the +The application passes a +.Vt changer_element_status_request +structure to the .Nm driver which contains the following fields: .Bd -literal -offset indent @@ -201,25 +230,36 @@ struct changer_element_status *cesr_element_status; .Pp This structure is read by the driver to determine the type, logical base address and number of elements for which information is to be -returned in the array of changer_element_status structures pointed to -by the cesr_element_status field. The application must allocate enough -memory for cesr_element_count status structures (see below). -The cesr_flags can optionally be set to +returned in the array of +.Vt changer_element_status +structures pointed to by the +.Va cesr_element_status field . +The application must allocate enough +memory for +.Va cesr_element_count +status structures (see below). +The +.Va cesr_flags +can optionally be set to .Dv CESR_VOLTAGS to indicate that volume tag (bar code) information is to be read from the jukebox and returned. .Pp -The cesr_element_base and cesr_element_count fields must be valid with -respect to the physical configuration of the changer. If they are -not, the +The +.Va cesr_element_base +and +.Va cesr_element_count +fields must be valid with respect to the physical configuration of the changer. +If they are not, the .Dv CHIOGSTATUS ioctl returns the .Er EINVAL error code. .Pp The information about the elements is returned in an array of -changer_element_status structures. This structure include at least -the following fields: +.Vt changer_element_status +structures. +This structure include at least the following fields: .Bd -literal -offset indent u_int ces_addr; /* element address in media changer */ u_char ces_flags; /* see CESTATUS definitions below */ @@ -236,11 +276,16 @@ u_char ces_lunvalid; /* ces_scsi_lun is valid */ u_char ces_scsi_lun; /* SCSI lun of element (if ces_lunvalid is nonzero) */ .Ed .Pp -The ces_addr field contains the address of the element in the -coordinate system of the media changer. It is not used by the driver, +The +.Va ces_addr +field contains the address of the element in the +coordinate system of the media changer. +It is not used by the driver, and should be used for diagnostic purposes only. .Pp -The following flags are defined for the \fBces_flags\fR field: +The following flags are defined for the +.Va ces_flags +field: .Bl -tag -width CESTATUS_IMPEXP .It Dv CESTATUS_FULL A medium is present. |