NAME | SYNOPSIS | INTERFACE LEVEL | PARAMETERS | DESCRIPTION | RETURN VALUES | CONTEXT | EXAMPLES | SEE ALSO
#include <sys/scsi/scsi.h>char *scsi_cname(uchar_t cmd, char **cmdvec);
Solaris DDI specific (Solaris DDI).
A SCSI command value.
Pointer to an array of command strings.
Device type.
A message value.
A packet reason value.
A SCSI sense key value.
scsi_cname() decodes SCSI commands. cmdvec is a pointer to an array of strings. The first byte of the string is the command value, and the remainder is the name of the command.
scsi_dname() decodes the peripheral device type (for example, direct access or sequential access) in the inquiry data.
scsi_mname() decodes SCSI messages.
scsi_rname() decodes packet completion reasons.
scsi_sname() decodes SCSI sense keys.
These functions return a pointer to a string. If an argument is invalid, they return a string to that effect.
These functions can be called from user or interrupt context.
static char *st_cmds[] = { "\000test unit ready", "\001rewind", "\003request sense", "\010read", "\012write", "\020write file mark", "\021space", "\022inquiry", "\025mode select", "\031erase tape", "\032mode sense", "\033load tape", NULL }; .. cmn_err(CE_CONT, "st: cmd=%s", scsi_cname(cmd, st_cmds)); ..
NAME | SYNOPSIS | INTERFACE LEVEL | PARAMETERS | DESCRIPTION | RETURN VALUES | CONTEXT | EXAMPLES | SEE ALSO