DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SCO OpenServer

printcfg(D3oddi)


printcfg -- display driver initialization message

Synopsis

   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  

 +-------+--------------+--------+-----+---------+---+
 |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) )

Context and synchronization

Initialization context

This routine is not interrupt-driven and therefore suspends all other system activities while executing.

Hardware applicability

All

Version applicability

oddi: 2, 2mp, 3, 3mp, 4, 4mp, 5, 5mp, 6, 6mp

SVR5 DDI compatibility

There is no equivalent function for DDI drivers, although SVR5 MDI drivers should use the mdi_printcfg(D3mdi) function in place of printcfg( ).

References

cmn_err(D3oddi)

``Error handling'' in HDK Technical Reference


19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 5 HDK - June 2005