void printcfg(char *name, unsigned base, unsigned offset,
int vec, int dma, char *fmt, void args)
Description
The
printcfg( )
function displays configuration information
for a device on the console.
The information is also stored in
the /usr/adm/messages file
by a background error logging program.
Use this function when displaying messages in the driver's
init(D2oddi)
entry point routine
to maintain consistency with
the initialization messages of other drivers.
Arguments
name
A character string containing the driver name. This string is required.
base
A hexadecimal address indicating the base of I/O addresses. Set to 0
(zero) to omit.
offset
A hexadecimal value indicating the range of I/O addresses
from base. Set to 0 (zero) to omit.
vec
A two digit decimal interrupt vector number derived from
switchable settings on the card. Set to -1 to omit.
dma
A decimal value indicating the direct memory access (DMA) channel.
Set to -1 to omit.
fmt
Formatting string for the message.
Use the data type specifications documented
for the format argument of the
cmn_err(D3oddi)
function.
A \n character is automatically appended to the end of
fmt.
args
Optional variables to be displayed using fmt.
Leading zeros are not displayed for the base value,
but are displayed if the %x or %b specifications
are used in the fmt argument.
Return values
None.
Usage
The following is displayed by printcfg:
device
address
vector
dma
comment
%name
0xbase-0xend
vec
dma
fmt
Where:
name
Driver name
base
The base of I/O addresses
end
The summed value of base + offset
vec
Interrupt vector (in decimal)
dma
Direct memory address (DMA) channel (in decimal)
fmt
A string to be displayed (similar to the format argument of
printf(D3oddi)
)