1 /* 2 * CDDL HEADER START 3 * 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. 8 * 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. 13 * 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] 19 * 20 * CDDL HEADER END 21 */ 22 /* 23 * Copyright 2002 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27 #ifndef _PICLLOM_H 28 #define _PICLLOM_H 29 30 #pragma ident "%Z%%M% %I% %E% SMI" 31 32 #ifdef __cplusplus 33 extern "C" { 34 #endif 35 36 /* 37 * Log message texts 38 */ 39 #define EM_INIT_FAILED gettext("SUNW_picllom: init failed!\n") 40 #define EM_MISSING_NODE gettext("SUNW_picllom: no %s node!\n") 41 #define EM_LOM_MISSING \ 42 gettext("SUNW_picllom: Lights Out Module missing!\n") 43 #define EM_LOM_NODE_MISSING \ 44 gettext("SUNW_picllom: failed to locate LOM device node\n") 45 #define EM_LOM_DUPLICATE \ 46 gettext("SUNW_picllom: more than one LOM device node found\n") 47 #define EM_CREATE_FAILED \ 48 gettext("SUNW_picllom: failed to create %s node\n") 49 #define EM_NO_LED_MEM \ 50 gettext("SUNW_picllom: couldn't get memory for LED nodes\n") 51 #define EM_LOMINFO_TREE_FAILED \ 52 gettext("SUNW_picllom: failed to initialize lom nodes\n") 53 #define EM_SYS_ERR gettext("SUNW_picllom: %s: %s\n") 54 #define EM_NO_CONFIG \ 55 gettext("SUNW_picllom: no config file picllom.conf") 56 57 /* 58 * define for super-user uid - used in credential checking 59 */ 60 #define SUPER_USER ((uid_t)0) 61 62 /* 63 * CPU temperature sensor labels 64 * prtdiag relies on the labels "ambient" and "die" when reporting CPU temp. 65 */ 66 #define CPU_ENCLOSURE "Enclosure" 67 #define CPU_AMBIENT "Ambient" 68 #define CPU_DIE "Die" 69 70 /* 71 * Constants for some PICL properties 72 */ 73 #define PICL_VOLTS_SHUTDOWN "VoltageShutdown" 74 75 /* 76 * Config file name 77 */ 78 #define LOM_CONFFILE_NAME "picllom.conf" 79 80 /* 81 * lom device mnior name 82 */ 83 #define LOM_DEV_MINOR_NAME ":lom" 84 85 typedef int16_t tempr_t; 86 87 typedef int (*ptree_vol_rdfunc_t)(ptree_rarg_t *arg, void *buf); 88 typedef int (*ptree_vol_wrfunc_t)(ptree_warg_t *arg, const void *buf); 89 90 typedef struct node_el { 91 picl_nodehdl_t nodeh; 92 struct node_el *next; 93 } node_el_t; 94 95 typedef struct node_list { 96 node_el_t *head; 97 node_el_t *tail; 98 } node_list_t; 99 100 #ifdef __cplusplus 101 } 102 #endif 103 104 #endif /* _PICLLOM_H */ 105