Kernel Functions for Drivers scsigetdevicetypestring(9F)
NAME
scsigetdevicetypestring - look up per-device-type,
returning matching information string
SYNOPSIS
#include
char *scsigetdevicetypestring(char *propname,
devinfot *dip, struct scsidevice *devp);
INTERFACE LEVEL
Solaris DI specific (Solaris DI).
PARAMETERS
propname Name of string array property that contains a
list of paired device-type information.
dip Pointer to the device info node for this HBA
driver.
devp Pointer to a scsidevice(9S) structure of the
target.
DESCRIPTION
The scsigetdevicetypestring() function looks up the
propname property, which can be specified in the HBA's
driver.conf(4)file. This property allows specification of
per-device-type information. The syntax for propname in a
driver.conf(4) file is:
The formal syntax is:
propname = [, *];
where:
:= "", " is returned by the device on a SCSI
inquiry command. This string can contain any character in
the range 0x20-0x7e. Characters such as double quote (") or
single quote ('), which are not permitted in property value
strings, are represented by their octal equivalent (for
example, \042 and \047). Trailing spaces can be truncated.
For example:
scsivhcifailoveroverride =
"STK FLEXLINE 400", "fasymlsi",
"SUN T4", "ftpgs";;
The scsigetdevicetypestring() function searches the list
of duplets for a matching INQUIRY string. If a match is
found, scsigetdevicetypestring returns a copy of the
string. The meaning of the returned string is determined by the caller.
RETURN VALUES
scsigetdevicetypestring() returns a copy of the matching
string, or if no match is found, NUL is
returned. When a non-NUL value is returned, the caller is
responsible for freeing the string via:
kmemfree(info, strlen(info) ] 1);
CONTEXT
This function can be called from kernel or interrupt con-
text.
SEE ALSO
driver.conf(4)
Writing Device Drivers
SunOS 5.11 Last change: 12 Jul 2007 2
|