diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2018-07-11 07:36:21 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2018-07-11 07:36:21 +0200 |
commit | 341aee5e3e3625173e4b684cc4166e60f6eb147f (patch) | |
tree | 133bb01bc02539bb98f98bfa6807dc084b995bec /util/oem_supermicro.c | |
parent | 631fa5250443f5441549bf3184830bc34b0c042e (diff) | |
parent | 788a8d509d66a15ecb1810599885792a1acaaeb9 (diff) |
Merge branch 'release/debian/3.1.1-1'debian/3.1.1-1
Diffstat (limited to 'util/oem_supermicro.c')
-rw-r--r-- | util/oem_supermicro.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/util/oem_supermicro.c b/util/oem_supermicro.c index 82d6647..62ecbfe 100644 --- a/util/oem_supermicro.c +++ b/util/oem_supermicro.c @@ -68,8 +68,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. void set_loglevel(int level); /*prototype */ extern char fsm_debug; /*mem_if.c*/ +#ifdef METACOMMAND +extern char * progver; /*from ipmiutil.c*/ +static char * progname = "ipmiutil smcoem"; +#else static char * progver = "3.08"; static char * progname = "ismcoem"; +#endif static int verbose = 0; static char fdebug = 0; static uchar g_bus = PUBLIC_BUS; @@ -513,12 +518,13 @@ int decode_sensor_supermicro(uchar *sdr,uchar *reading,char *pstring, int slen, return(rv); } +extern int get_MemDesc(int array, int dimm, char *desc, int *psz); /*mem_if.c*/ #define NPAIRS 26 char rgpair[NPAIRS] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; int decode_mem_supermicro(int prod, uchar b2, uchar b3, char *desc, int *psz) { int cpu, pair, dimm, n; - int rv = -1; + int rv = 0; int ver = 0; uchar bdata; if ((desc == NULL) || (psz == NULL)) return -1; @@ -564,18 +570,17 @@ int decode_mem_supermicro(int prod, uchar b2, uchar b3, char *desc, int *psz) if (pair > NPAIRS) pair = NPAIRS - 1; dimm = (bdata & 0x0F) - 9; /*0x0A=dimmX1, 0x0B=dimmX2*/ if (dimm < 0) - n = sprintf(desc,"unknown DIMM"); /* was ver 0 */ + n = sprintf(desc,DIMM_UNKNOWN); /* invalid */ else n = sprintf(desc,"P%d_DIMM%c%d",cpu,rgpair[pair],dimm); } -#ifdef DMIOK /* Use DMI if we get confirmation about cpu/dimm indices. */ if (! is_remote()) { fsm_debug = fdebug; rv = get_MemDesc(cpu,dimm,desc,psz); /* if (rv != 0) desc has "DIMM[%d}" */ } -#endif + if ((bdata == 0xFF) || (rv != 0)) n = sprintf(desc,DIMM_UNKNOWN); if (fdebug) printf("decode_mem_supermicro: v%d bdata=%02x(%d) cpu=%d dimm=%d pair=%d\n",ver,bdata,bdata,cpu,dimm,pair); |