Merge commit '9276b3991ba20d5a5660887ba81b0bc7bed25a0c'
[unleashed.git] / share / man / man9f / scsi_log.9f
blobc33cd3a40e5ad32de48dbd12ccc12e1a6310df58
1 '\" te
2 .\"  Copyright (c) 2006, Sun Microsystems, Inc.,  All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH SCSI_LOG 9F "Jan 16, 2006"
7 .SH NAME
8 scsi_log \- display a SCSI-device-related message
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <sys/scsi/scsi.h>
13  #include <sys/cmn_err.h>
17 \fBvoid\fR \fBscsi_log\fR(\fBdev_info_t *\fR\fIdip\fR, \fBchar *\fR\fIdrv_name\fR, \fBuint_t\fR \fIlevel\fR,
18      \fBconst char *\fR\fIfmt\fR\fB, ...\fR);
19 .fi
21 .SH INTERFACE LEVEL
22 .sp
23 .LP
24 Solaris DDI specific (Solaris DDI).
25 .SH PARAMETERS
26 .sp
27 .ne 2
28 .na
29 \fB\fIdip\fR\fR
30 .ad
31 .RS 12n
32 Pointer to the \fBdev_info\fR structure.
33 .RE
35 .sp
36 .ne 2
37 .na
38 \fB\fIdrv_name\fR\fR
39 .ad
40 .RS 12n
41 String naming the device.
42 .RE
44 .sp
45 .ne 2
46 .na
47 \fB\fIlevel\fR\fR
48 .ad
49 .RS 12n
50 Error level.
51 .RE
53 .sp
54 .ne 2
55 .na
56 \fB\fIfmt\fR\fR
57 .ad
58 .RS 12n
59 Display format.
60 .RE
62 .SH DESCRIPTION
63 .sp
64 .LP
65 The \fBscsi_log()\fR function is a utility function that displays a message via
66 the \fBcmn_err\fR(9F) routine. The error levels that can be passed in to this
67 function are \fBCE_PANIC\fR, \fBCE_WARN\fR, \fBCE_NOTE\fR, \fBCE_CONT\fR, and
68 \fBSCSI_DEBUG\fR. The last level is used to assist in displaying debug messages
69 to the console only. \fIdrv_name\fR is the short name by which this device is
70 known; example disk driver names are \fBsd\fR and \fBcmdk\fR. If the
71 \fIdev_info_t\fR pointer is \fINULL\fR, then the \fIdrv_name\fR will be used
72 with no unit or long name.
73 .sp
74 .LP
75 If the first character in \fIformat\fR is:
76 .RS +4
77 .TP
78 .ie t \(bu
79 .el o
80 An exclamation mark (\fB!\fR), the message goes only to the system buffer.
81 .RE
82 .RS +4
83 .TP
84 .ie t \(bu
85 .el o
86 A caret (\fB^\fR), the message goes only to the console.
87 .RE
88 .RS +4
89 .TP
90 .ie t \(bu
91 .el o
92 A question mark (\fB?\fR) and \fIlevel\fR is \fBCE_CONT\fR, the message is
93 always sent to the system buffer, but is written to the console only when the
94 system has been booted in verbose mode. See \fBkernel\fR(8). If neither
95 condition is met, the \fB?\fR character has no effect and is simply ignored.
96 .RE
97 .sp
98 .LP
99 All formatting conversions in use by \fBcmn_err()\fR also work with
100 \fBscsi_log()\fR.
101 .SH CONTEXT
104 The \fBscsi_log()\fR function may be called from user, interrupt, or kernel
105 context.
106 .SH SEE ALSO
109 \fBkernel\fR(8), \fBsd\fR(7D), \fBcmn_err\fR(9F), \fBscsi_errmsg\fR(9F)
112 \fIWriting Device Drivers\fR