(Vt "struct changer_element_status_request") Perform the 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. With each call to CHIOGSTATUS, the status of one or more elements of one type may be queried. The application passes a .Vt changer_element_status_request structure to the ch driver which contains the following fields:
u_int cesr_element_type;
u_int cesr_element_base;
u_int cesr_element_count;
u_int cesr_flags;
struct changer_element_status *cesr_element_status;
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 .Vt 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 CESR_VOLTAGS to indicate that volume tag (bar code) information is to be read from the jukebox and returned. 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 CHIOGSTATUS ioctl returns the EINVAL error code. The information about the elements is returned in an array of .Vt changer_element_status structures. This structure include at least the following fields:
u_int ces_addr; /* element address in media changer */
u_char ces_flags;/* see CESTATUS definitions below */
u_char ces_sensecode; /* additional sense code for element */
u_char ces_sensequal; /* additional sense code qualifier */
u_char ces_invert; /* invert bit */
u_char ces_svalid; /* source address (ces_source) valid */
u_shortces_source; /* source address of medium */
changer_voltag_t ces_pvoltag; /* primary volume tag */
changer_voltag_t ces_avoltag; /* alternate volume tag */
u_char ces_idvalid; /* ces_scsi_id is valid */
u_char ces_scsi_id; /* SCSI id of element (if ces_idvalid is nonzero) */
u_char ces_lunvalid; /* ces_scsi_lun is valid */
u_char ces_scsi_lun; /* SCSI lun of element (if ces_lunvalid is nonzero) */
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, and should be used for diagnostic purposes only. The following flags are defined for the ces_flags field: |