| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
#ifdef HAVE_CONFIG_H |
| 20 |
#include "config.h" |
| 21 |
#endif |
| 22 |
|
| 23 |
#include <stdio.h> |
| 24 |
#include <stdlib.h> |
| 25 |
#if STDC_HEADERS |
| 26 |
#include <string.h> |
| 27 |
#include <stdarg.h> |
| 28 |
#endif |
| 29 |
#include <assert.h> |
| 30 |
#include <errno.h> |
| 31 |
|
| 32 |
#include "freeipmi/sel/ipmi-sel.h" |
| 33 |
|
| 34 |
#include "freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h" |
| 35 |
#include "freeipmi/spec/ipmi-product-id-spec.h" |
| 36 |
|
| 37 |
#include "ipmi-sel-common.h" |
| 38 |
#include "ipmi-sel-defs.h" |
| 39 |
#include "ipmi-sel-string.h" |
| 40 |
#include "ipmi-sel-string-supermicro-common.h" |
| 41 |
#include "ipmi-sel-trace.h" |
| 42 |
#include "ipmi-sel-util.h" |
| 43 |
|
| 44 |
#include "freeipmi-portability.h" |
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
int |
| 51 |
sel_string_output_supermicro_overheat_mobo_event_data1_class_oem (ipmi_sel_ctx_t ctx, |
| 52 |
struct ipmi_sel_entry *sel_entry, |
| 53 |
uint8_t sel_record_type, |
| 54 |
char *tmpbuf, |
| 55 |
unsigned int tmpbuflen, |
| 56 |
unsigned int flags, |
| 57 |
unsigned int *wlen, |
| 58 |
struct ipmi_sel_system_event_record_data *system_event_record_data) |
| 59 |
{ |
| 60 |
int ret; |
| 61 |
|
| 62 |
assert (ctx); |
| 63 |
assert (ctx->magic == IPMI_SEL_CTX_MAGIC); |
| 64 |
assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_SUPERMICRO |
| 65 |
|| ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_SUPERMICRO_WORKAROUND); |
| 66 |
assert (sel_entry); |
| 67 |
assert (tmpbuf); |
| 68 |
assert (tmpbuflen); |
| 69 |
assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); |
| 70 |
assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); |
| 71 |
assert (wlen); |
| 72 |
assert (system_event_record_data); |
| 73 |
assert (ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8DTH |
| 74 |
|| ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8DTG |
| 75 |
|| ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8DTU |
| 76 |
|| ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8DT3_LN4F |
| 77 |
|| ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8DTU_6PLUS |
| 78 |
|| ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8DTL |
| 79 |
|| ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8DTL_3F |
| 80 |
|| ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8SIL_F |
| 81 |
|| ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X9SCL |
| 82 |
|| ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X9SCM |
| 83 |
|| ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8DTNPLUS_F |
| 84 |
|| ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8SIE |
| 85 |
|| ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X9SCA_F_O |
| 86 |
|| ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_H8DGU_F |
| 87 |
|| ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_H8DGU |
| 88 |
|| ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_H8DG6 |
| 89 |
|| ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X9DRI_F |
| 90 |
|| ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X9DRI_LN4F_PLUS |
| 91 |
|| ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X9SPU_F_O |
| 92 |
|| ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X9SCM_IIF |
| 93 |
|| ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_H8SGL_F); |
| 94 |
|
| 95 |
if ((ret = sel_string_output_supermicro_overheat_event_data1_class_oem (ctx, |
| 96 |
sel_entry, |
| 97 |
sel_record_type, |
| 98 |
tmpbuf, |
| 99 |
tmpbuflen, |
| 100 |
flags, |
| 101 |
wlen, |
| 102 |
system_event_record_data)) < 0) |
| 103 |
return (-1); |
| 104 |
|
| 105 |
if (ret) |
| 106 |
return (1); |
| 107 |
|
| 108 |
return (0); |
| 109 |
} |
| 110 |
|
| 111 |
struct sel_string_oem sel_string_oem_supermicro_overheat_common = |
| 112 |
{ |
| 113 |
NULL, |
| 114 |
NULL, |
| 115 |
&sel_string_output_supermicro_overheat_mobo_event_data1_class_oem, |
| 116 |
NULL, |
| 117 |
NULL, |
| 118 |
NULL, |
| 119 |
NULL, |
| 120 |
NULL, |
| 121 |
NULL, |
| 122 |
NULL, |
| 123 |
NULL, |
| 124 |
NULL, |
| 125 |
}; |