'\"macro stdmacro
.if n .pH ddi_dki.print @(#)print	40.5 of 10/10/89
.\" Copyright 1989 AT&T
.de IX
.ie '\\n(.z'' .tm .Index: \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9	\\n%
.el \\!.IX \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
..
.nr X
.if \nX=0 .ds x} print D2DK "" "DDI/DKI" "\&"
.if \nX=1 .ds x} print D2DK "" "DDI/DKI"
.if \nX=2 .ds x} print D2DK "" "\&"
.if \nX=3 .ds x} print "" "" "\&"
.TH \*(x}
.IX "\f4print\fP(D2DK)"
.SH "NAME"
\f4print\f1 \- display a driver message on system console
.SH "SYNOPSIS"
.nf
.na
\f4
#include <sys/types.h>
#include <sys/errno.h>
.sp 0.5
int \f2prefix\f4print(\f4dev_t\f1 \f2dev, \f4char *\f1\f2str\f4);\f1
.ad
.fi
.SH "ARGUMENTS"
.RS 0n
.IP \f2dev\f1 10n
Device number.
.IP \f2*str\f1 10n
Pointer to a character string describing the problem.
An explanation of the problem contained
in the string should be included in the driver output.
.RE
.SH "DESCRIPTION"
The
\f4print\f1 routine is called indirectly by the
kernel through the \f4bdevsw\f1 entry for the
device when the kernel has detected an exceptional condition (such as
out of space) in the device.  To display the message on the console,
the driver should use the \f4cmn_err\f1(D3DK) kernel function. 
.IX "\f4cmn_err\fP(D3DK)"
.SH "RETURN VALUE"
The \f4print\f1 routine should return 0 for success,
or the appropriate error number.  Refer to Appendix A for a
list of DDI/DKI error numbers.  The \f4print\f1 routine can fail if the driver
implemented a non-standard \f4print\f1 routine that attempted to perform error
logging, but was unable to complete the logging for whatever reason. 
Generally, since most \f4print\f1 routines call the \f4cmn_err\f1(D3DK)
function, and this function is declared as \f4void\f1, return values
are seldom returned from this routine.  If a failure occurs, call
\f4cmn_err\f1 to display a message to the operator.
.SH "SEE ALSO"
.na
\f4cmn_err\f1(D3DK)
.ad
