2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License (the "License").
2N/A * You may not use this file except in compliance with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A/*
2N/A * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
2N/A * Use is subject to license terms.
2N/A */
2N/A
2N/A/*
2N/A * Common definitions
2N/A */
2N/A
2N/A#ifndef _L_COMMON_H
2N/A#define _L_COMMON_H
2N/A
2N/A
2N/A
2N/A/*
2N/A * Include any headers you depend on.
2N/A */
2N/A
2N/A/*
2N/A * I18N message number ranges
2N/A * This file: 14500 - 14999
2N/A * Shared common messages: 1 - 1999
2N/A */
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/A#include <sys/scsi/targets/sesio.h>
2N/A
2N/A/*
2N/A * Debug environmental flags.
2N/A */
2N/A/* SCSI Commands */
2N/A#define S_DPRINTF if (getenv("_LUX_S_DEBUG") != NULL) (void) printf
2N/A
2N/A/* General purpose */
2N/A#define P_DPRINTF if (getenv("_LUX_P_DEBUG") != NULL) (void) printf
2N/A
2N/A/* Opens */
2N/A#define O_DPRINTF if (getenv("_LUX_O_DEBUG") != NULL) (void) printf
2N/A
2N/A/* Ioctls */
2N/A#define I_DPRINTF if (getenv("_LUX_I_DEBUG") != NULL) (void) printf
2N/A
2N/A/* Hot-Plug */
2N/A#define H_DPRINTF if (getenv("_LUX_H_DEBUG") != NULL) (void) printf
2N/A
2N/A/* Convert Name debug variable. */
2N/A#define L_DPRINTF if (getenv("_LUX_L_DEBUG") != NULL) (void) printf
2N/A
2N/A/* Getting status */
2N/A#define G_DPRINTF if (getenv("_LUX_G_DEBUG") != NULL) (void) printf
2N/A
2N/A/* Box list */
2N/A#define B_DPRINTF if (getenv("_LUX_B_DEBUG") != NULL) (void) printf
2N/A
2N/A/* Non-Photon disks */
2N/A#define N_DPRINTF if (getenv("_LUX_N_DEBUG") != NULL) (void) printf
2N/A
2N/A/* Null WWN FCdisks */
2N/A#define W_DPRINTF if (getenv("_LUX_W_DEBUG") != NULL) (void) printf
2N/A
2N/A/* Devices */
2N/A#define D_DPRINTF if (getenv("_LUX_D_DEBUG") != NULL) (void) printf
2N/A
2N/A/* Enable/Bypass */
2N/A#define E_DPRINTF if (getenv("_LUX_E_DEBUG") != NULL) (void) printf
2N/A
2N/A/* Standard Error messages. */
2N/A#define ER_DPRINTF if (getenv("_LUX_ER_DEBUG") != NULL) (void) printf
2N/A
2N/A/* Retries */
2N/A#define R_DPRINTF if (getenv("_LUX_R_DEBUG") != NULL) (void) printf
2N/A
2N/A/* Threads & Timing */
2N/A#define T_DPRINTF if (getenv("_LUX_T_DEBUG") != NULL) (void) printf
2N/A
2N/A/* Allocation */
2N/A#define A_DPRINTF if (getenv("_LUX_A_DEBUG") != NULL) (void) printf
2N/A
2N/A
2N/A
2N/A
2N/A/* Warning messages */
2N/A#define L_WARNINGS if (getenv("_LUX_WARNINGS") != NULL) (void) printf
2N/A
2N/A
2N/A#define MIN(a, b) (a < b ? a : b)
2N/A
2N/A/*
2N/A * format parameter to dump()
2N/A */
2N/A#define HEX_ONLY 0 /* print hex only */
2N/A#define HEX_ASCII 1 /* hex and ascii */
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _L_COMMON_H */