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
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]
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.
31 * Copyright 2016 Joyent, Inc.
34 #ifndef _SYS_CMN_ERR_H
35 #define _SYS_CMN_ERR_H
37 #if !defined(_ASM) && defined(_KERNEL)
38 #include <sys/va_list.h>
41 #include <sys/dditypes.h>
47 /* Common error handling severity levels */
49 #define CE_CONT 0 /* continuation */
50 #define CE_NOTE 1 /* notice */
51 #define CE_WARN 2 /* warning */
52 #define CE_PANIC 3 /* panic */
53 #define CE_IGNORE 4 /* print nothing */
55 #if !defined(_ASM) && defined(_KERNEL)
58 extern void cmn_err(int, const char *, ...)
61 extern void vzcmn_err(zoneid_t
, int, const char *, __va_list
)
64 extern void dev_err(dev_info_t
*, int, char *, ...)
67 extern void vdev_err(dev_info_t
*, int, const char *, __va_list
)
70 extern void vcmn_err(int, const char *, __va_list
)
74 extern void zcmn_err(zoneid_t
, int, const char *, ...)
78 extern void printf(const char *, ...)
81 extern void vzprintf(zoneid_t
, const char *, __va_list
)
85 extern void zprintf(zoneid_t
, const char *, ...)
88 extern void vprintf(const char *, __va_list
)
92 extern void uprintf(const char *, ...)
95 extern void vuprintf(const char *, __va_list
)
99 extern size_t snprintf(char *, size_t, const char *, ...)
101 extern size_t vsnprintf(char *, size_t, const char *, __va_list
)
104 extern char *sprintf(char *, const char *, ...)
106 extern char *vsprintf(char *, const char *, __va_list
)
110 extern void panic(const char *, ...)
111 __KPRINTFLIKE(1) __NORETURN
;
113 extern void vpanic(const char *, __va_list
)
114 __KVPRINTFLIKE(1) __NORETURN
;
116 #endif /* !_ASM && _KERNEL ... */
122 #endif /* _SYS_CMN_ERR_H */