6198 Let's EOL cachefs
[illumos-gate.git] / usr / src / lib / storage / common / l_common.h
blobe42abfaa95cac9767c335a1253bade39db2fbf48
1 /*
2 * CDDL HEADER START
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]
19 * CDDL HEADER END
22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
27 * Common definitions
30 #ifndef _L_COMMON_H
31 #define _L_COMMON_H
36 * Include any headers you depend on.
40 * I18N message number ranges
41 * This file: 14500 - 14999
42 * Shared common messages: 1 - 1999
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
49 #include <sys/scsi/targets/sesio.h>
52 * Debug environmental flags.
54 /* SCSI Commands */
55 #define S_DPRINTF if (getenv("_LUX_S_DEBUG") != NULL) (void) printf
57 /* General purpose */
58 #define P_DPRINTF if (getenv("_LUX_P_DEBUG") != NULL) (void) printf
60 /* Opens */
61 #define O_DPRINTF if (getenv("_LUX_O_DEBUG") != NULL) (void) printf
63 /* Ioctls */
64 #define I_DPRINTF if (getenv("_LUX_I_DEBUG") != NULL) (void) printf
66 /* Hot-Plug */
67 #define H_DPRINTF if (getenv("_LUX_H_DEBUG") != NULL) (void) printf
69 /* Convert Name debug variable. */
70 #define L_DPRINTF if (getenv("_LUX_L_DEBUG") != NULL) (void) printf
72 /* Getting status */
73 #define G_DPRINTF if (getenv("_LUX_G_DEBUG") != NULL) (void) printf
75 /* Box list */
76 #define B_DPRINTF if (getenv("_LUX_B_DEBUG") != NULL) (void) printf
78 /* Non-Photon disks */
79 #define N_DPRINTF if (getenv("_LUX_N_DEBUG") != NULL) (void) printf
81 /* Null WWN FCdisks */
82 #define W_DPRINTF if (getenv("_LUX_W_DEBUG") != NULL) (void) printf
84 /* Devices */
85 #define D_DPRINTF if (getenv("_LUX_D_DEBUG") != NULL) (void) printf
87 /* Enable/Bypass */
88 #define E_DPRINTF if (getenv("_LUX_E_DEBUG") != NULL) (void) printf
90 /* Standard Error messages. */
91 #define ER_DPRINTF if (getenv("_LUX_ER_DEBUG") != NULL) (void) printf
93 /* Retries */
94 #define R_DPRINTF if (getenv("_LUX_R_DEBUG") != NULL) (void) printf
96 /* Threads & Timing */
97 #define T_DPRINTF if (getenv("_LUX_T_DEBUG") != NULL) (void) printf
99 /* Allocation */
100 #define A_DPRINTF if (getenv("_LUX_A_DEBUG") != NULL) (void) printf
105 /* Warning messages */
106 #define L_WARNINGS if (getenv("_LUX_WARNINGS") != NULL) (void) printf
109 #define MIN(a, b) (a < b ? a : b)
112 * format parameter to dump()
114 #define HEX_ONLY 0 /* print hex only */
115 #define HEX_ASCII 1 /* hex and ascii */
117 #ifdef __cplusplus
119 #endif
121 #endif /* _L_COMMON_H */