📄 rsa_str2event.c
字号:
/* -*- linux-c -*- * * (C) Copyright IBM Corp. 2004 * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This * file and program are licensed under a BSD style license. See * the Copying file included with the OpenHPI distribution for * full licensing terms. *//******************************************************************* * WARNING! This file is auto-magically generated by rsa_str2event.pl * Do not change this file manually. Update script instead *******************************************************************/#include <glib.h>#include <string.h>#include <SaHpi.h>#include <openhpi.h>#include <rsa_resources.h>#include <rsa_str2event.h>static void free_hash_data(gpointer key, gpointer value, gpointer user_data);/* Global String 2 Event Hash Table */GHashTable * rsa_str2event_hash;int rsa_str2event_hash_init() { gchar *key;/* gchar *key_exists; */ Str2EventInfoT *strinfo; rsa_str2event_hash = g_hash_table_new(g_str_hash, g_str_equal); if (rsa_str2event_hash == NULL) { dbg("Cannot allocate rsa_str2event_hash table"); return -1; } key = "System over recommended voltage on +5vB (I/O Planar)."; strinfo = g_malloc0(sizeof(Str2EventInfoT)); if (!strinfo) { dbg("Cannot allocate memory for hash value - %s", key); rsa_str2event_hash_free(); return -1; } strinfo->event = "06035504"; /* EN_IO_5VB_PFA_HI */ strinfo->event_sev = SAHPI_CRITICAL; strinfo->event_ovr = OVR_SEV; strinfo->event_dup = 0; g_hash_table_insert(rsa_str2event_hash, key, strinfo); key = "System under recommended voltage for +12v."; strinfo = g_malloc0(sizeof(Str2EventInfoT)); if (!strinfo) { dbg("Cannot allocate memory for hash value - %s", key); rsa_str2event_hash_free(); return -1; } strinfo->event = "06037800"; /* EN_PFA_LO_FAULT_12V_PLANAR */ strinfo->event_sev = SAHPI_MAJOR; strinfo->event_ovr = OVR_SEV; strinfo->event_dup = 0; g_hash_table_insert(rsa_str2event_hash, key, strinfo); key = "Power Supply 4 AC Power Removed, Early Power Off Warning"; strinfo = g_malloc0(sizeof(Str2EventInfoT)); if (!strinfo) { dbg("Cannot allocate memory for hash value - %s", key); rsa_str2event_hash_free(); return -1; } strinfo->event = "08180004"; /* EN_FAULT_PS4_EPOW */ strinfo->event_sev = SAHPI_CRITICAL; strinfo->event_ovr = OVR_SEV; strinfo->event_dup = 0; g_hash_table_insert(rsa_str2event_hash, key, strinfo); key = "System shutoff due to +5vA (I/O Planar) under voltage."; strinfo = g_malloc0(sizeof(Str2EventInfoT)); if (!strinfo) { dbg("Cannot allocate memory for hash value - %s", key); rsa_str2event_hash_free(); return -1; } strinfo->event = "06034883"; /* EN_IO_5VA_CUTOFF_LOW */ strinfo->event_sev = SAHPI_CRITICAL; strinfo->event_ovr = OVR_SEV; strinfo->event_dup = 0; g_hash_table_insert(rsa_str2event_hash, key, strinfo); key = "PCI Expansion Unit %s: Continuous +5v over voltage, powering off."; strinfo = g_malloc0(sizeof(Str2EventInfoT)); if (!strinfo) { dbg("Cannot allocate memory for hash value - %s", key); rsa_str2event_hash_free(); return -1; } strinfo->event = "1B02A500"; /* EN_EXP4_CUTOFF_HI_FAULT_5V_CONT */ strinfo->event_sev = SAHPI_CRITICAL; strinfo->event_ovr = OVR_SEV; strinfo->event_dup = 0; g_hash_table_insert(rsa_str2event_hash, key, strinfo); key = "VRM 9 Fault"; strinfo = g_malloc0(sizeof(Str2EventInfoT)); if (!strinfo) { dbg("Cannot allocate memory for hash value - %s", key); rsa_str2event_hash_free(); return -1; } strinfo->event = "04400009"; /* EN_FAULT_VRM9 */ strinfo->event_sev = SAHPI_CRITICAL; strinfo->event_ovr = OVR_SEV; strinfo->event_dup = 0; g_hash_table_insert(rsa_str2event_hash, key, strinfo); key = "System shutoff due to +3.3v under voltage."; strinfo = g_malloc0(sizeof(Str2EventInfoT)); if (!strinfo) { dbg("Cannot allocate memory for hash value - %s", key); rsa_str2event_hash_free(); return -1; } strinfo->event = "08032880"; /* EN_CUTOFF_LO_FAULT_3_35V */ strinfo->event_sev = SAHPI_CRITICAL; strinfo->event_ovr = OVR_SEV; strinfo->event_dup = 0; g_hash_table_insert(rsa_str2event_hash, key, strinfo); key = "System shutoff due to A/D Reference under voltage."; strinfo = g_malloc0(sizeof(Str2EventInfoT)); if (!strinfo) { dbg("Cannot allocate memory for hash value - %s", key); rsa_str2event_hash_free(); return -1; } strinfo->event = "06034881"; /* EN_AD_REF_5V_CUT_LOW */ strinfo->event_sev = SAHPI_CRITICAL; strinfo->event_ovr = OVR_SEV; strinfo->event_dup = 0; g_hash_table_insert(rsa_str2event_hash, key, strinfo); key = "System shutoff due to CPU 5 over temperature."; strinfo = g_malloc0(sizeof(Str2EventInfoT)); if (!strinfo) { dbg("Cannot allocate memory for hash value - %s", key); rsa_str2event_hash_free(); return -1; } strinfo->event = "0421C485"; /* EN_CUTOFF_HI_OVER_TEMP_CPU5 */ strinfo->event_sev = SAHPI_CRITICAL; strinfo->event_ovr = OVR_SEV; strinfo->event_dup = 0; g_hash_table_insert(rsa_str2event_hash, key, strinfo); key = "Power Supply 1 -12V Under Voltage Fault"; strinfo = g_malloc0(sizeof(Str2EventInfoT)); if (!strinfo) { dbg("Cannot allocate memory for hash value - %s", key); rsa_str2event_hash_free(); return -1; } strinfo->event = "0823E801"; /* EN_FAULT_PS1_N12V_UNDER */ strinfo->event_sev = SAHPI_CRITICAL; strinfo->event_ovr = OVR_SEV; strinfo->event_dup = 0; g_hash_table_insert(rsa_str2event_hash, key, strinfo); key = "VRM Power Good Fault"; strinfo = g_malloc0(sizeof(Str2EventInfoT)); if (!strinfo) { dbg("Cannot allocate memory for hash value - %s", key); rsa_str2event_hash_free(); return -1; } strinfo->event = "04428000"; /* EN_FAULT_VRM_POWER_GOOD */ strinfo->event_sev = SAHPI_CRITICAL; strinfo->event_ovr = OVR_SEV; strinfo->event_dup = 0; g_hash_table_insert(rsa_str2event_hash, key, strinfo); key = "PCI Expansion Unit %s: +3.3V Power Not Adequate."; strinfo = g_malloc0(sizeof(Str2EventInfoT)); if (!strinfo) { dbg("Cannot allocate memory for hash value - %s", key); rsa_str2event_hash_free(); return -1; } strinfo->event = "19A29004"; /* EN_EXP2_FAULT_3_3V_PWR_GOOD */ strinfo->event_sev = SAHPI_CRITICAL; strinfo->event_ovr = OVR_SEV; strinfo->event_dup = 0; g_hash_table_insert(rsa_str2event_hash, key, strinfo); key = "Power Controller not present."; strinfo = g_malloc0(sizeof(Str2EventInfoT)); if (!strinfo) { dbg("Cannot allocate memory for hash value - %s", key); rsa_str2event_hash_free(); return -1; } strinfo->event = "0801E000"; /* EN_PBP_NP */ strinfo->event_sev = SAHPI_MAJOR; strinfo->event_ovr = OVR_SEV; strinfo->event_dup = 0; g_hash_table_insert(rsa_str2event_hash, key, strinfo); key = "Power Good Fault"; strinfo = g_malloc0(sizeof(Str2EventInfoT)); if (!strinfo) { dbg("Cannot allocate memory for hash value - %s", key); rsa_str2event_hash_free(); return -1; } strinfo->event = "00028000"; /* EN_FAULT_POWER_GOOD */ strinfo->event_sev = SAHPI_CRITICAL; strinfo->event_ovr = OVR_SEV; strinfo->event_dup = 0; g_hash_table_insert(rsa_str2event_hash, key, strinfo); key = "System over recommended temperature for PCI area."; strinfo = g_malloc0(sizeof(Str2EventInfoT)); if (!strinfo) { dbg("Cannot allocate memory for hash value - %s", key); rsa_str2event_hash_free(); return -1; } strinfo->event = "0601C401"; /* EN_PFA_HI_OVER_TEMP_PCI */ strinfo->event_sev = SAHPI_INFORMATIONAL; strinfo->event_ovr = OVR_SEV; strinfo->event_dup = 0; g_hash_table_insert(rsa_str2event_hash, key, strinfo); key = "PCI Expansion Unit %s: Fan 3 Failure Single fan failure"; strinfo = g_malloc0(sizeof(Str2EventInfoT)); if (!strinfo) { dbg("Cannot allocate memory for hash value - %s", key); rsa_str2event_hash_free(); return -1; } strinfo->event = "18026803"; /* EN_EXP1_FAN3_SPEED */ strinfo->event_sev = SAHPI_CRITICAL; strinfo->event_ovr = OVR_SEV; strinfo->event_dup = 0; g_hash_table_insert(rsa_str2event_hash, key, strinfo); key = "Cable: Power Supply Not Present"; strinfo = g_malloc0(sizeof(Str2EventInfoT)); if (!strinfo) { dbg("Cannot allocate memory for hash value - %s", key); rsa_str2event_hash_free(); return -1; } strinfo->event = "08024001"; /* EN_PRESENT_CABLE_PSU */ strinfo->event_sev = SAHPI_INFORMATIONAL; strinfo->event_ovr = OVR_SEV; strinfo->event_dup = 0; g_hash_table_insert(rsa_str2event_hash, key, strinfo); key = "CPU 5 shut off due to over temperature"; strinfo = g_malloc0(sizeof(Str2EventInfoT)); if (!strinfo) { dbg("Cannot allocate memory for hash value - %s", key); rsa_str2event_hash_free(); return -1; } strinfo->event = "0421C405"; /* EN_PROC_HOT_CPU5 */ strinfo->event_sev = SAHPI_CRITICAL; strinfo->event_ovr = OVR_SEV; strinfo->event_dup = 0; g_hash_table_insert(rsa_str2event_hash, key, strinfo); key = "System is under recommended voltage on VRM 2."; strinfo = g_malloc0(sizeof(Str2EventInfoT)); if (!strinfo) { dbg("Cannot allocate memory for hash value - %s", key); rsa_str2event_hash_free(); return -1; } strinfo->event = "04401802"; /* EN_PFA_LO_FAULT_VRM2 */ strinfo->event_sev = SAHPI_CRITICAL; strinfo->event_ovr = OVR_SEV; strinfo->event_dup = 0; g_hash_table_insert(rsa_str2event_hash, key, strinfo); key = "Power Supply 1 5V Over Voltage Fault"; strinfo = g_malloc0(sizeof(Str2EventInfoT)); if (!strinfo) { dbg("Cannot allocate memory for hash value - %s", key); rsa_str2event_hash_free(); return -1; } strinfo->event = "08234481"; /* EN_FAULT_PS1_5V_OVER */ strinfo->event_sev = SAHPI_CRITICAL; strinfo->event_ovr = OVR_SEV; strinfo->event_dup = 0; g_hash_table_insert(rsa_str2event_hash, key, strinfo); key = "System shutoff due to +5vA (I/O Planar) over voltage."; strinfo = g_malloc0(sizeof(Str2EventInfoT)); if (!strinfo) { dbg("Cannot allocate memory for hash value - %s", key); rsa_str2event_hash_free(); return -1; } strinfo->event = "06034483"; /* EN_IO_5VA_CUTOFF_HI */ strinfo->event_sev = SAHPI_CRITICAL; strinfo->event_ovr = OVR_SEV; strinfo->event_dup = 0; g_hash_table_insert(rsa_str2event_hash, key, strinfo); key = "CD-ROM drive cable is not plugged in."; strinfo = g_malloc0(sizeof(Str2EventInfoT)); if (!strinfo) { dbg("Cannot allocate memory for hash value - %s", key); rsa_str2event_hash_free(); return -1; } strinfo->event = "06A1E000"; /* EN_MD_CD_NP */ strinfo->event_sev = SAHPI_MINOR; strinfo->event_ovr = OVR_SEV; strinfo->event_dup = 0; g_hash_table_insert(rsa_str2event_hash, key, strinfo); key = "Power Supply 1 5V Fault"; strinfo = g_malloc0(sizeof(Str2EventInfoT)); if (!strinfo) { dbg("Cannot allocate memory for hash value - %s", key); rsa_str2event_hash_free(); return -1; } strinfo->event = "08234081"; /* EN_FAULT_PS1_5V_OCOVUV */ strinfo->event_sev = SAHPI_CRITICAL; strinfo->event_ovr = OVR_SEV; strinfo->event_dup = 0; g_hash_table_insert(rsa_str2event_hash, key, strinfo); key = "Hard Drive Fault (SCSI ID 8)"; strinfo = g_malloc0(sizeof(Str2EventInfoT)); if (!strinfo) { dbg("Cannot allocate memory for hash value - %s", key); rsa_str2event_hash_free(); return -1; } strinfo->event = "06801008"; /* EN_FAULT_DASD1_SCSI_ID_8 */ strinfo->event_sev = SAHPI_CRITICAL; strinfo->event_ovr = OVR_SEV; strinfo->event_dup = 0; g_hash_table_insert(rsa_str2event_hash, key, strinfo); key = "Fan 3 Failure Multiple fan failures"; strinfo = g_malloc0(sizeof(Str2EventInfoT)); if (!strinfo) { dbg("Cannot allocate memory for hash value - %s", key); rsa_str2event_hash_free(); return -1; } strinfo->event = "00026803"; /* EN_FAN3_SPEED */ strinfo->event_sev = SAHPI_CRITICAL; strinfo->event_ovr = OVR_SEV; strinfo->event_dup = 0; g_hash_table_insert(rsa_str2event_hash, key, strinfo); key = "System over recommended voltage on +2.5v."; strinfo = g_malloc0(sizeof(Str2EventInfoT)); if (!strinfo) { dbg("Cannot allocate memory for hash value - %s", key); rsa_str2event_hash_free(); return -1; } strinfo->event = "08031480"; /* EN_PFA_HI_FAULT_2_5V */ strinfo->event_sev = SAHPI_MAJOR; strinfo->event_ovr = OVR_SEV; strinfo->event_dup = 0; g_hash_table_insert(rsa_str2event_hash, key, strinfo); key = "Power Supply 3 Over Voltage Fault."; strinfo = g_malloc0(sizeof(Str2EventInfoT)); if (!strinfo) { dbg("Cannot allocate memory for hash value - %s", key); rsa_str2event_hash_free(); return -1; } strinfo->event = "08218483"; /* EN_PS3_OVER_VOL */ strinfo->event_sev = SAHPI_CRITICAL; strinfo->event_ovr = OVR_SEV; strinfo->event_dup = 0; g_hash_table_insert(rsa_str2event_hash, key, strinfo); key = "VRM 10 Fault"; strinfo = g_malloc0(sizeof(Str2EventInfoT)); if (!strinfo) { dbg("Cannot allocate memory for hash value - %s", key); rsa_str2event_hash_free(); return -1; } strinfo->event = "0440000A"; /* EN_FAULT_VRM10 */ strinfo->event_sev = SAHPI_CRITICAL;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -