4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
39 extern int fmd_assert(const char *, const char *, int);
40 #define ASSERT(x) ((void)((x) || fmd_assert(#x, __FILE__, __LINE__)))
45 extern void fmd_vpanic(const char *, va_list);
46 extern void fmd_panic(const char *, ...);
48 extern void fmd_verror(int, const char *, va_list);
49 extern void fmd_error(int, const char *, ...);
51 #define FMD_DBG_HELP 0x0001 /* display list of debugging modes and exit */
52 #define FMD_DBG_ERR 0x0002 /* enable error handling debug messages */
53 #define FMD_DBG_MOD 0x0004 /* enable module subsystem debug messages */
54 #define FMD_DBG_DISP 0x0008 /* enable dispq subsystem debug messages */
55 #define FMD_DBG_XPRT 0x0010 /* enable transport subsystem debug messages */
56 #define FMD_DBG_EVT 0x0020 /* enable event subsystem debug messages */
57 #define FMD_DBG_LOG 0x0040 /* enable log subsystem debug messages */
58 #define FMD_DBG_TMR 0x0080 /* enable timer subsystem debug messages */
59 #define FMD_DBG_FMRI 0x0100 /* enable fmri subsystem debug messages */
60 #define FMD_DBG_ASRU 0x0200 /* enable asru subsystem debug messages */
61 #define FMD_DBG_CASE 0x0400 /* enable case subsystem debug messages */
62 #define FMD_DBG_CKPT 0x0800 /* enable checkpoint debug messages */
63 #define FMD_DBG_RPC 0x1000 /* enable rpc service debug messages */
64 #define FMD_DBG_TRACE 0x2000 /* display matching TRACE() calls */
65 #define FMD_DBG_ALL 0x1ffe /* enable all modes except for HELP, TRACE */
67 extern void fmd_vdprintf(int, const char *, va_list);
68 extern void fmd_dprintf(int, const char *, ...);
70 extern void fmd_trace_cpp(void *, const char *, int);
71 extern void *fmd_trace(uint_t
, const char *, ...);
74 #define TRACE(args) { fmd_trace_cpp(fmd_trace args, __FILE__, __LINE__); }
79 extern const char *fmd_ea_strerror(int);
80 extern uint64_t fmd_ena(void);
81 extern uint32_t fmd_ntz32(uint32_t);
87 #endif /* _FMD_SUBR_H */