diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-05-01 10:13:19 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-05-01 10:13:19 +0200 |
commit | a1cf5d4924bb115d7de05e0bc080f88e04d24d29 (patch) | |
tree | 01484827e16d2c8e42a0fe32a561d1f9fd4a5472 /util/oem_supermicro.c | |
parent | 7a765f655540e4e254f4aaaf6ea3326a57d76e59 (diff) | |
parent | fc806628dbeecd34f41b2f6d04290631dca3955e (diff) |
Update upstream source from tag 'upstream/3.1.0'
Update to upstream version '3.1.0'
with Debian dir 7f3343aa24cd6de6310e636ce7444692bec74f2a
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); |