8809 libzpool should leverage work done in libfakekernel
[unleashed.git] / usr / src / lib / libfakekernel / common / sys / cmn_err.h
blobc77b22b868256a955b5bcf61ac086e644a47bed3
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.
31 * Copyright 2016 Joyent, Inc.
32 * Copyright 2017 RackTop Systems.
35 #ifndef _SYS_CMN_ERR_H
36 #define _SYS_CMN_ERR_H
38 #include <stdio.h>
40 #if !defined(_ASM) && (defined(_KERNEL) || defined(_FAKE_KERNEL))
41 #include <sys/va_list.h>
42 #endif
44 #include <sys/dditypes.h>
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
50 /* Common error handling severity levels */
52 #define CE_CONT 0 /* continuation */
53 #define CE_NOTE 1 /* notice */
54 #define CE_WARN 2 /* warning */
55 #define CE_PANIC 3 /* panic */
56 #define CE_IGNORE 4 /* print nothing */
58 #if !defined(_ASM) && (defined(_KERNEL) || defined(_FAKE_KERNEL))
60 /*PRINTFLIKE2*/
61 extern void cmn_err(int, const char *, ...)
62 __KPRINTFLIKE(2);
64 extern void vcmn_err(int, const char *, __va_list)
65 __KVPRINTFLIKE(2);
67 /*PRINTFLIKE1*/
68 extern void panic(const char *, ...)
69 __KPRINTFLIKE(1) __NORETURN;
71 extern void vpanic(const char *, __va_list)
72 __KVPRINTFLIKE(1) __NORETURN;
74 #endif /* !_ASM && (_KERNEL || _FAKE_KERNEL) */
76 #ifdef __cplusplus
78 #endif
80 #endif /* _SYS_CMN_ERR_H */