cmd.h revision 822fb41d6f36e90a1ec836b32f869e1235e7da40
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _CMD_H
#define _CMD_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdarg.h>
#include <cmd_list.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Diagnosis of certain errors requires that either a) the type of ereport be
* recorded in a persistent buffer or b) that a single value be used to
* represent multiple ereport classes. We start the values at 0x8 to avoid
* collisions with an earlier class code enum. While we have 64 bits available
* to us, cmd_errcl_t's are saved in persistent buffers, and thus can't easily
* grow beyond that size. As such, ereports should only be assigned class codes
* when needed.
*/
#define CMD_ERRCL_UCC 0x0000000000000008ULL
#define CMD_ERRCL_UCU 0x0000000000000010ULL
#define CMD_ERRCL_CPC 0x0000000000000020ULL
#define CMD_ERRCL_CPU 0x0000000000000040ULL
#define CMD_ERRCL_WDC 0x0000000000000080ULL
#define CMD_ERRCL_WDU 0x0000000000000100ULL
#define CMD_ERRCL_EDC 0x0000000000000200ULL
#define CMD_ERRCL_EDU_ST 0x0000000000000400ULL
#define CMD_ERRCL_EDU_BL 0x0000000000000800ULL
#define CMD_ERRCL_L3_UCC 0x0000000000001000ULL
#define CMD_ERRCL_L3_UCU 0x0000000000002000ULL
#define CMD_ERRCL_L3_CPC 0x0000000000004000ULL
#define CMD_ERRCL_L3_CPU 0x0000000000008000ULL
#define CMD_ERRCL_L3_WDC 0x0000000000010000ULL
#define CMD_ERRCL_L3_WDU 0x0000000000020000ULL
#define CMD_ERRCL_L3_EDC 0x0000000000040000ULL
#define CMD_ERRCL_L3_EDU_ST 0x0000000000080000ULL
#define CMD_ERRCL_L3_EDU_BL 0x0000000000100000ULL
#define CMD_ERRCL_L3_MECC 0x0000000000200000ULL
/* hole for sequential expansion */
#define CMD_ERRCL_RCE 0x0000040000000000ULL
#define CMD_ERRCL_RUE 0x0000080000000000ULL
#define CMD_ERRCL_FRC 0x0000100000000000ULL
#define CMD_ERRCL_FRU 0x0000200000000000ULL
#define CMD_ERRCL_IOCE 0x0000400000000000ULL
#define CMD_ERRCL_IOUE 0x0000800000000000ULL
#define CMD_ERRCL_DAC 0x0001000000000000ULL
#define CMD_ERRCL_DSC 0x0002000000000000ULL
#define CMD_ERRCL_DAU 0x0004000000000000ULL
#define CMD_ERRCL_DSU 0x0008000000000000ULL
#define CMD_ERRCL_ISL2XXCU(clcode) \
#define CMD_ERRCL_ISL3XXCU(clcode) \
#define CMD_ERRCL_ISIOXE(clcode) \
typedef uint64_t cmd_errcl_t;
struct cmd_xxcu_trw;
typedef struct cmd_stat {
/* # of possible sticky CEs: */
} cmd_stat_t;
typedef struct cmd_serd {
const char *cs_name;
} cmd_serd_t;
typedef struct cmd {
} cmd_t;
extern int cmd_set_errno(int);
extern void cmd_bufname(char *, size_t, const char *, ...);
#ifdef __cplusplus
}
#endif
#endif /* _CMD_H */