PRINTCFG(K) UNIX System V PRINTCFG(K)
Name
printcfg - displays driver initialization message
Syntax
int
printcfg(name, base, offset, vec, dma, fmt, args)
char *name, *fmt;
unsigned base, offset;
int vec, dma;
void args;
Description
This routine displays configuration information for a device
on the console. The information is also stored in
/usr/adm/messages by a background error logging program.
Use this routine when displaying messages in the xxinit
routine of a driver to maintain consistency with other
drivers' initialization messages.
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 octal)
dma Direct memory address (DMA) channel (in
decimal)
Parameters
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 octal 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 A string to be displayed similar to the
format argument to printf(S). fmt also
accepts specifications for displaying
the arg variables. The supported
specifications are:
Type Description
%b two-digit hexadecimal byte
%c character
%d signed decimal
%o unsigned octal
%s string (character pointer)
%x hexadecimal (prints leading zeros)
The specification values can be
indicated in either upper or lower case.
Field length specifications cannot be
used for arguments. For example, %9d is
not permitted. Escaped characters such
as \n (new line), \t (tab), \r (return),
and so on are C language features
supported by the C compiler and thus are
supported in this kernel routine. A \n
character is automatically appended to
the end of fmt.
args Optional variables to be displayed using
fmt.
This routine is not interrupt-driven and therefore suspends
all other system activities while executing.
Leading zeros are not displayed for the base value, but are
displayed if the %x or %b specifications are used in the fmt
argument.
This routine does not function properly on consoles running
layers(C).
See Also
cmn_err(K), printf(K), printf(S), layers(C)
(printed 7/6/89)