6198 Let's EOL cachefs
[illumos-gate.git] / usr / src / uts / common / sys / cmn_err.h
blob4ebcb1d4f1719fef017709a551553a01d66e1af4
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
22 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
23 /* All Rights Reserved */
27 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
28 * Use is subject to license terms.
30 * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
33 #ifndef _SYS_CMN_ERR_H
34 #define _SYS_CMN_ERR_H
36 #if !defined(_ASM) && (defined(_KERNEL) || defined(_FAKE_KERNEL))
37 #include <sys/va_list.h>
38 #endif
40 #include <sys/dditypes.h>
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
46 /* Common error handling severity levels */
48 #define CE_CONT 0 /* continuation */
49 #define CE_NOTE 1 /* notice */
50 #define CE_WARN 2 /* warning */
51 #define CE_PANIC 3 /* panic */
52 #define CE_IGNORE 4 /* print nothing */
54 #if !defined(_ASM) && (defined(_KERNEL) || defined(_FAKE_KERNEL))
56 /*PRINTFLIKE2*/
57 extern void cmn_err(int, const char *, ...)
58 __KPRINTFLIKE(2);
60 extern void vzcmn_err(zoneid_t, int, const char *, __va_list)
61 __KVPRINTFLIKE(3);
63 extern void dev_err(dev_info_t *, int, char *, ...)
64 __KPRINTFLIKE(3);
66 extern void vcmn_err(int, const char *, __va_list)
67 __KVPRINTFLIKE(2);
69 /*PRINTFLIKE3*/
70 extern void zcmn_err(zoneid_t, int, const char *, ...)
71 __KPRINTFLIKE(3);
73 /*PRINTFLIKE1*/
74 extern void printf(const char *, ...)
75 __KPRINTFLIKE(1);
77 extern void vzprintf(zoneid_t, const char *, __va_list)
78 __KVPRINTFLIKE(2);
80 /*PRINTFLIKE2*/
81 extern void zprintf(zoneid_t, const char *, ...)
82 __KPRINTFLIKE(2);
84 extern void vprintf(const char *, __va_list)
85 __KVPRINTFLIKE(1);
87 /*PRINTFLIKE1*/
88 extern void uprintf(const char *, ...)
89 __KPRINTFLIKE(1);
91 extern void vuprintf(const char *, __va_list)
92 __KVPRINTFLIKE(1);
94 /*PRINTFLIKE3*/
95 extern size_t snprintf(char *, size_t, const char *, ...)
96 __KPRINTFLIKE(3);
97 extern size_t vsnprintf(char *, size_t, const char *, __va_list)
98 __KVPRINTFLIKE(3);
99 /*PRINTFLIKE2*/
100 extern char *sprintf(char *, const char *, ...)
101 __KPRINTFLIKE(2);
102 extern char *vsprintf(char *, const char *, __va_list)
103 __KVPRINTFLIKE(2);
105 /*PRINTFLIKE1*/
106 extern void panic(const char *, ...)
107 __KPRINTFLIKE(1) __NORETURN;
109 extern void vpanic(const char *, __va_list)
110 __KVPRINTFLIKE(1) __NORETURN;
112 #endif /* !_ASM && _KERNEL ... */
114 #ifdef __cplusplus
116 #endif
118 #endif /* _SYS_CMN_ERR_H */