diff options
| author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-02-24 21:18:20 +0100 | 
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-02-24 21:18:20 +0100 | 
| commit | 7a40b1039a0cef3c47c75260f47aba0548c1cdbb (patch) | |
| tree | 9cc82aefd88f309aea07c58dbd6056922bdbea9c | |
| parent | f504e2f8269ff2f133f0700c8ad03ad4f05df49a (diff) | |
| parent | e6806f1d217e07f52759e4fa1c792d1fe02f0d50 (diff) | |
Merge tag 'upstream/3.0.2'
Upstream version 3.0.2
48 files changed, 512 insertions, 184 deletions
| @@ -25,7 +25,7 @@ License:   BSD-3-clause  Files: util/md2.h  Copyright: 2003 FreeIPMI Core Team -Comment:   Optional to include this file, only if 'configure --enable-gpl'  +Comment:   Build does not include this file, unless 'configure --enable-gpl'   License:   GPL-2.0  Files: util/AnsiTerm.cpp @@ -4217,5 +4217,28 @@ wdt.8          iwdt.8       (ipmiutil wdt)      ...(various subcommands)	 ver 3.01      ifwum	(ipmiutil fwum)  	 ver 1.3      ihpm	(ipmiutil hpm)  	 ver 1.09 -    idiscover (ipmiutil discover) ver 1.11 +    idiscover(ipmiutil discover) ver 1.11 +    ipmi_port	(ipmi_port)  	 ver 1.4 + +02/16/2016 ARCress ipmiutil-3.0.2  changes +  util/isensor.c        - if oem sensors, vary output by fsimple +  scripts/ipmiutil_wdt  - fixup for systemd (from Mike Williams) +  README, COPYING       - clarify that md2.h is not included unless --enable-gpl +  util/oem_lenovo.c     - decode IBM disk slot sensors +  util/oem_supermicro.c - fixup for P1_DIMMA-9 case +  util/ihealth.c        - add more IBM product strings +  util/ievents.c        - added drive 05 = not redundant +  util/oem_asus.c       - new, added OEM ASUS module +  util/ipmicmd.h        - added VENDOR_ASUS id +  util/subs.c           - added vendor ASUS +  util/isensor.c        - added call to decode_sensor_asus +  util/Makefile.am      - add oem_asus.c +  util/ipmiutil.mak     - add oem_asus.c +  util/ipmiutil64.mak   - add oem_asus.c +  ipmiutil-3.0.2 contains: +    ipmiutil	(ipmiutil)  	 ver 3.02 +    ...(various subcommands)	 ver 3.02 +    ifwum	(ipmiutil fwum)  	 ver 1.3 +    ihpm	(ipmiutil hpm)  	 ver 1.09 +    idiscover(ipmiutil discover) ver 1.11      ipmi_port	(ipmi_port)  	 ver 1.4 @@ -141,7 +141,7 @@ ipmiutil-developers at lists.sourceforge.net or http://ipmiutil.sf.net  The BSD License in the COPYING file applies to all source files   herein, except for     * util/md5.c (Aladdin unrestricted license, compatible with BSD)  -  * util/md2.h (GPL) +  * util/md2.h (GPL, not used unless do configure --enable-gpl)    * util/ipmi_ioctls.h (GPL, now defunct and removed)  While the BSD License allows code reuse in both open and non-open   applications, the md2.h and ipmi_ioctls.h files would have to be removed  @@ -4,9 +4,6 @@ IPMIUTIL PROJECT TODO LIST:  Add subcommand to consolidate user functions     . enable, disable, list, set(priv/username/psw) -Add support for openssl-1.1.0 for fedora -   . detect new vs. old, handle both -  IPV6 for IPMI LAN on Windows:      Currently support IPV6 on Linux, but need to implement for Windows also     . implement IPV6 for Windows (#ifdef WIN32 case) @@ -14,11 +11,14 @@ IPV6 for IPMI LAN on Windows:  Test SuperMicro DIMM event logic (pending bad DIMM)     PARTIAL in ipmiutil-2.9.9, revised code implemented -Add OEM Lenovo sensor decoding  +Add support for openssl-1.1.0 for fedora     COMPLETE in ipmiutil-3.0.1  Add OEM Lenovo SEL decoding  -   PARTIAL in ipmiutil-3.0.1 +   PARTIAL in ipmiutil-3.0.1, pending test data + +Add OEM Lenovo sensor decoding  +   COMPLETE in ipmiutil-3.0.1  Thread-safe changes for IPMI LAN:     Change ipmicmd.c/ipmilan.c to be thread-safe if accessing multiple nodes. @@ -1,6 +1,6 @@  #! /bin/sh  # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63 for ipmiutil 3.0.1. +# Generated by GNU Autoconf 2.63 for ipmiutil 3.0.2.  #  # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,  # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. @@ -743,8 +743,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}  # Identity of this package.  PACKAGE_NAME='ipmiutil'  PACKAGE_TARNAME='ipmiutil' -PACKAGE_VERSION='3.0.1' -PACKAGE_STRING='ipmiutil 3.0.1' +PACKAGE_VERSION='3.0.2' +PACKAGE_STRING='ipmiutil 3.0.2'  PACKAGE_BUGREPORT=''  ac_unique_file="util/ipmiutil.c" @@ -1503,7 +1503,7 @@ if test "$ac_init_help" = "long"; then    # Omit some internal or obsolete options to make the list less imposing.    # This message is too long to be a string in the A/UX 3.1 sh.    cat <<_ACEOF -\`configure' configures ipmiutil 3.0.1 to adapt to many kinds of systems. +\`configure' configures ipmiutil 3.0.2 to adapt to many kinds of systems.  Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1573,7 +1573,7 @@ fi  if test -n "$ac_init_help"; then    case $ac_init_help in -     short | recursive ) echo "Configuration of ipmiutil 3.0.1:";; +     short | recursive ) echo "Configuration of ipmiutil 3.0.2:";;     esac    cat <<\_ACEOF @@ -1683,7 +1683,7 @@ fi  test -n "$ac_init_help" && exit $ac_status  if $ac_init_version; then    cat <<\_ACEOF -ipmiutil configure 3.0.1 +ipmiutil configure 3.0.2  generated by GNU Autoconf 2.63  Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1697,7 +1697,7 @@ cat >config.log <<_ACEOF  This file contains any messages produced by compilers while  running configure, to aid debugging if configure makes a mistake. -It was created by ipmiutil $as_me 3.0.1, which was +It was created by ipmiutil $as_me 3.0.2, which was  generated by GNU Autoconf 2.63.  Invocation command line was    $ $0 $@ @@ -2551,7 +2551,7 @@ fi  # Define the identity of the package.   PACKAGE='ipmiutil' - VERSION='3.0.1' + VERSION='3.0.2'  cat >>confdefs.h <<_ACEOF @@ -13943,7 +13943,7 @@ exec 6>&1  # report actual input values of CONFIG_FILES etc. instead of their  # values after options handling.  ac_log=" -This file was extended by ipmiutil $as_me 3.0.1, which was +This file was extended by ipmiutil $as_me 3.0.2, which was  generated by GNU Autoconf 2.63.  Invocation command line was    CONFIG_FILES    = $CONFIG_FILES @@ -14006,7 +14006,7 @@ Report bugs to <bug-autoconf@gnu.org>."  _ACEOF  cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1  ac_cs_version="\\ -ipmiutil config.status 3.0.1 +ipmiutil config.status 3.0.2  configured by $0, generated by GNU Autoconf 2.63,    with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff --git a/configure.ac b/configure.ac index c16acb3..a1d38c5 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@  dnl Process this file with autoconf to produce a configure script. -AC_INIT(ipmiutil,3.0.1) +AC_INIT(ipmiutil,3.0.2)  AC_CONFIG_SRCDIR(util/ipmiutil.c)  echo "ipmiutil version ${PACKAGE_VERSION}"  AM_CONFIG_HEADER(config.h) diff --git a/debpkg/changelog b/debpkg/changelog index 7a612ca..892812f 100644 --- a/debpkg/changelog +++ b/debpkg/changelog @@ -1,3 +1,15 @@ +ipmiutil (3.0.2-1) unstable; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Fri, 03 Feb 2017 17:23:29 -0500 + +ipmiutil (3.0.2-1) unstable; urgency=low + +  * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net>  Fri, 20 Jan 2017 10:33:17 -0500 +  ipmiutil (3.0.1-1) unstable; urgency=low    * New upstream version. diff --git a/doc/Makefile b/doc/Makefile index f1c35d4..07c0069 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -46,12 +46,12 @@ CONFIG_CLEAN_VPATH_FILES =  SOURCES =  DIST_SOURCES =  DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = ${SHELL} /usr/dev/ipmiutil-3.0.1/missing --run aclocal-1.11 -AMTAR = ${SHELL} /usr/dev/ipmiutil-3.0.1/missing --run tar +ACLOCAL = ${SHELL} /usr/dev/ipmiutil-3.0.2/missing --run aclocal-1.11 +AMTAR = ${SHELL} /usr/dev/ipmiutil-3.0.2/missing --run tar  AR = ar -AUTOCONF = ${SHELL} /usr/dev/ipmiutil-3.0.1/missing --run autoconf -AUTOHEADER = ${SHELL} /usr/dev/ipmiutil-3.0.1/missing --run autoheader -AUTOMAKE = ${SHELL} /usr/dev/ipmiutil-3.0.1/missing --run automake-1.11 +AUTOCONF = ${SHELL} /usr/dev/ipmiutil-3.0.2/missing --run autoconf +AUTOHEADER = ${SHELL} /usr/dev/ipmiutil-3.0.2/missing --run autoheader +AUTOMAKE = ${SHELL} /usr/dev/ipmiutil-3.0.2/missing --run automake-1.11  AWK = gawk  CC = gcc  CCDEPMODE = depmode=gcc3 @@ -99,7 +99,7 @@ LIB_DIR = /usr/lib64  LIPO =   LN_S = ln -s  LTLIBOBJS =  -MAKEINFO = ${SHELL} /usr/dev/ipmiutil-3.0.1/missing --run makeinfo +MAKEINFO = ${SHELL} /usr/dev/ipmiutil-3.0.2/missing --run makeinfo  MKDIR_P = /bin/mkdir -p  NM = /usr/bin/nm -B  NMEDIT =  @@ -113,9 +113,9 @@ OTOOL64 =  PACKAGE = ipmiutil  PACKAGE_BUGREPORT =   PACKAGE_NAME = ipmiutil -PACKAGE_STRING = ipmiutil 3.0.1 +PACKAGE_STRING = ipmiutil 3.0.2  PACKAGE_TARNAME = ipmiutil -PACKAGE_VERSION = 3.0.1 +PACKAGE_VERSION = 3.0.2  PATH_SEPARATOR = :  PKG_DIR = /root/rpmbuild  RANLIB = ranlib @@ -127,11 +127,11 @@ SHR_LINK = libipmiutil.so.1  STRIP = strip  SUBDIR_S = doc scripts lib util  SYSTEMD_DIR = /usr/share/ipmiutil -VERSION = 3.0.1 -abs_builddir = /usr/dev/ipmiutil-3.0.1/doc -abs_srcdir = /usr/dev/ipmiutil-3.0.1/doc -abs_top_builddir = /usr/dev/ipmiutil-3.0.1 -abs_top_srcdir = /usr/dev/ipmiutil-3.0.1 +VERSION = 3.0.2 +abs_builddir = /usr/dev/ipmiutil-3.0.2/doc +abs_srcdir = /usr/dev/ipmiutil-3.0.2/doc +abs_top_builddir = /usr/dev/ipmiutil-3.0.2 +abs_top_srcdir = /usr/dev/ipmiutil-3.0.2  ac_ct_CC = gcc  ac_ct_DUMPBIN =   am__include = include @@ -159,7 +159,7 @@ host_vendor = redhat  htmldir = ${docdir}  includedir = ${prefix}/include  infodir = ${datarootdir}/info -install_sh = ${SHELL} /usr/dev/ipmiutil-3.0.1/install-sh +install_sh = ${SHELL} /usr/dev/ipmiutil-3.0.2/install-sh  libdir = ${exec_prefix}/lib  libexecdir = ${exec_prefix}/libexec  localedir = ${datarootdir}/locale diff --git a/doc/UserGuide b/doc/UserGuide index 6f46cd7..b35739a 100644 --- a/doc/UserGuide +++ b/doc/UserGuide @@ -1,6 +1,6 @@                    IPMIUTIL USER GUIDE  -                     VERSION 3.0.1 +                     VERSION 3.0.2           An easy-to-use IPMI server management utility diff --git a/doc/ipmiutil.spec b/doc/ipmiutil.spec index 4f95a86..6fab0b4 100644 --- a/doc/ipmiutil.spec +++ b/doc/ipmiutil.spec @@ -3,7 +3,7 @@  # Copyright (c) 2012 Andy Cress  #  Name:      ipmiutil -Version: 3.0.1 +Version: 3.0.2  Release: 1%{?dist}  Summary:   Easy-to-use IPMI server management utilities  License:   BSD diff --git a/lib/Makefile b/lib/Makefile index e4b621d..1378ff4 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -47,12 +47,12 @@ CONFIG_CLEAN_VPATH_FILES =  SOURCES =  DIST_SOURCES =  DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = ${SHELL} /usr/dev/ipmiutil-3.0.1/missing --run aclocal-1.11 -AMTAR = ${SHELL} /usr/dev/ipmiutil-3.0.1/missing --run tar +ACLOCAL = ${SHELL} /usr/dev/ipmiutil-3.0.2/missing --run aclocal-1.11 +AMTAR = ${SHELL} /usr/dev/ipmiutil-3.0.2/missing --run tar  AR = ar -AUTOCONF = ${SHELL} /usr/dev/ipmiutil-3.0.1/missing --run autoconf -AUTOHEADER = ${SHELL} /usr/dev/ipmiutil-3.0.1/missing --run autoheader -AUTOMAKE = ${SHELL} /usr/dev/ipmiutil-3.0.1/missing --run automake-1.11 +AUTOCONF = ${SHELL} /usr/dev/ipmiutil-3.0.2/missing --run autoconf +AUTOHEADER = ${SHELL} /usr/dev/ipmiutil-3.0.2/missing --run autoheader +AUTOMAKE = ${SHELL} /usr/dev/ipmiutil-3.0.2/missing --run automake-1.11  AWK = gawk  CC = gcc  CCDEPMODE = depmode=gcc3 @@ -101,7 +101,7 @@ LIB_DIR = /usr/lib64  LIPO =   LN_S = ln -s  LTLIBOBJS =  -MAKEINFO = ${SHELL} /usr/dev/ipmiutil-3.0.1/missing --run makeinfo +MAKEINFO = ${SHELL} /usr/dev/ipmiutil-3.0.2/missing --run makeinfo  MKDIR_P = /bin/mkdir -p  NM = /usr/bin/nm -B  NMEDIT =  @@ -115,9 +115,9 @@ OTOOL64 =  PACKAGE = ipmiutil  PACKAGE_BUGREPORT =   PACKAGE_NAME = ipmiutil -PACKAGE_STRING = ipmiutil 3.0.1 +PACKAGE_STRING = ipmiutil 3.0.2  PACKAGE_TARNAME = ipmiutil -PACKAGE_VERSION = 3.0.1 +PACKAGE_VERSION = 3.0.2  PATH_SEPARATOR = :  PKG_DIR = /root/rpmbuild  RANLIB = ranlib @@ -129,11 +129,11 @@ SHR_LINK = libipmiutil.so.1  STRIP = strip  SUBDIR_S = doc scripts lib util  SYSTEMD_DIR = /usr/share/ipmiutil -VERSION = 3.0.1 -abs_builddir = /usr/dev/ipmiutil-3.0.1/lib -abs_srcdir = /usr/dev/ipmiutil-3.0.1/lib -abs_top_builddir = /usr/dev/ipmiutil-3.0.1 -abs_top_srcdir = /usr/dev/ipmiutil-3.0.1 +VERSION = 3.0.2 +abs_builddir = /usr/dev/ipmiutil-3.0.2/lib +abs_srcdir = /usr/dev/ipmiutil-3.0.2/lib +abs_top_builddir = /usr/dev/ipmiutil-3.0.2 +abs_top_srcdir = /usr/dev/ipmiutil-3.0.2  ac_ct_CC = gcc  ac_ct_DUMPBIN =   am__include = include @@ -161,7 +161,7 @@ host_vendor = redhat  htmldir = ${docdir}  includedir = ${prefix}/include  infodir = ${datarootdir}/info -install_sh = ${SHELL} /usr/dev/ipmiutil-3.0.1/install-sh +install_sh = ${SHELL} /usr/dev/ipmiutil-3.0.2/install-sh  libdir = $(iprefix)/lib  libexecdir = ${exec_prefix}/libexec  localedir = ${datarootdir}/locale diff --git a/lib/libipmiutil.pc b/lib/libipmiutil.pc index e88343c..a1d97de 100644 --- a/lib/libipmiutil.pc +++ b/lib/libipmiutil.pc @@ -8,6 +8,6 @@ nutuser=@RUN_AS_USER@  Name: libipmiutil  Description: Library for ipmiutil -Version: 3.0.1 +Version: 3.0.2  Libs: -L${libdir} -lipmi_lanplus  Cflags: -I${includedir} diff --git a/scripts/Makefile b/scripts/Makefile index 7ac10e6..6818ee0 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -46,12 +46,12 @@ CONFIG_CLEAN_VPATH_FILES =  SOURCES =  DIST_SOURCES =  DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = ${SHELL} /usr/dev/ipmiutil-3.0.1/missing --run aclocal-1.11 -AMTAR = ${SHELL} /usr/dev/ipmiutil-3.0.1/missing --run tar +ACLOCAL = ${SHELL} /usr/dev/ipmiutil-3.0.2/missing --run aclocal-1.11 +AMTAR = ${SHELL} /usr/dev/ipmiutil-3.0.2/missing --run tar  AR = ar -AUTOCONF = ${SHELL} /usr/dev/ipmiutil-3.0.1/missing --run autoconf -AUTOHEADER = ${SHELL} /usr/dev/ipmiutil-3.0.1/missing --run autoheader -AUTOMAKE = ${SHELL} /usr/dev/ipmiutil-3.0.1/missing --run automake-1.11 +AUTOCONF = ${SHELL} /usr/dev/ipmiutil-3.0.2/missing --run autoconf +AUTOHEADER = ${SHELL} /usr/dev/ipmiutil-3.0.2/missing --run autoheader +AUTOMAKE = ${SHELL} /usr/dev/ipmiutil-3.0.2/missing --run automake-1.11  AWK = gawk  CC = gcc  CCDEPMODE = depmode=gcc3 @@ -99,7 +99,7 @@ LIB_DIR = /usr/lib64  LIPO =   LN_S = ln -s  LTLIBOBJS =  -MAKEINFO = ${SHELL} /usr/dev/ipmiutil-3.0.1/missing --run makeinfo +MAKEINFO = ${SHELL} /usr/dev/ipmiutil-3.0.2/missing --run makeinfo  MKDIR_P = /bin/mkdir -p  NM = /usr/bin/nm -B  NMEDIT =  @@ -113,9 +113,9 @@ OTOOL64 =  PACKAGE = ipmiutil  PACKAGE_BUGREPORT =   PACKAGE_NAME = ipmiutil -PACKAGE_STRING = ipmiutil 3.0.1 +PACKAGE_STRING = ipmiutil 3.0.2  PACKAGE_TARNAME = ipmiutil -PACKAGE_VERSION = 3.0.1 +PACKAGE_VERSION = 3.0.2  PATH_SEPARATOR = :  PKG_DIR = /root/rpmbuild  RANLIB = ranlib @@ -127,11 +127,11 @@ SHR_LINK = libipmiutil.so.1  STRIP = strip  SUBDIR_S = doc scripts lib util  SYSTEMD_DIR = /usr/share/ipmiutil -VERSION = 3.0.1 -abs_builddir = /usr/dev/ipmiutil-3.0.1/scripts -abs_srcdir = /usr/dev/ipmiutil-3.0.1/scripts -abs_top_builddir = /usr/dev/ipmiutil-3.0.1 -abs_top_srcdir = /usr/dev/ipmiutil-3.0.1 +VERSION = 3.0.2 +abs_builddir = /usr/dev/ipmiutil-3.0.2/scripts +abs_srcdir = /usr/dev/ipmiutil-3.0.2/scripts +abs_top_builddir = /usr/dev/ipmiutil-3.0.2 +abs_top_srcdir = /usr/dev/ipmiutil-3.0.2  ac_ct_CC = gcc  ac_ct_DUMPBIN =   am__include = include @@ -159,7 +159,7 @@ host_vendor = redhat  htmldir = ${docdir}  includedir = ${prefix}/include  infodir = ${datarootdir}/info -install_sh = ${SHELL} /usr/dev/ipmiutil-3.0.1/install-sh +install_sh = ${SHELL} /usr/dev/ipmiutil-3.0.2/install-sh  libdir = ${exec_prefix}/lib  libexecdir = ${exec_prefix}/libexec  localedir = ${datarootdir}/locale diff --git a/scripts/ipmiutil_wdt b/scripts/ipmiutil_wdt index b3ffcf1..d253ec3 100755 --- a/scripts/ipmiutil_wdt +++ b/scripts/ipmiutil_wdt @@ -20,18 +20,13 @@  # Description: Init script to enable and reset ipmiutil watchdog timer via cron  ### END INIT INFO  # -#if [ -f /etc/init.d/functions ]; then -# Source function library. -#. /etc/init.d/functions -#fi  name=ipmiutil_wdt  prog="/usr/bin/ipmiutil wdt"  wdtcron=/etc/cron.d/wdt  LOCKFILE=/var/lock/subsys/$name  wdtlog=/var/log/$name -#tmpcron=/tmp/wdtcron.$$ -# tmpcron2=/tmp/wdtcron2.$$ +wdtsec=150  # default 150 seconds for watchdog timeout (2*60 + 30)  start() {  	echo -n "Starting $prog: " @@ -48,26 +43,19 @@ start() {  	   echo "No ipmi driver loaded, aborting."  	   RETVAL=1  	else -           # configure the watchdog for a 90 second timeout -	   $prog -e -t 90  >$wdtlog +	   # configure the watchdog for a 150 second timeout +	   $prog -e -t $wdtsec  >$wdtlog  	   RETVAL=$? -           if [ $RETVAL -eq 0 ] -	   then -             # restart the watchdog every 60 seconds via crontab (skip) -             # cat - <<%%% >$tmpcron -#* * * * * $prog -r  -#%%% -             # crontab $tmpcron -	     # RETVAL=$? -             # restart the watchdog every 60 seconds via /etc/cron.d -             cat - <<%%% >$wdtcron +	   if [ $RETVAL -eq 0 ]; then +	     # restart the watchdog every 60 seconds via /etc/cron.d +	     cat - <<%%% >$wdtcron  * * * * *  root  $prog -r >/dev/null  %%%  	     # make crond re-read the /etc/cron.d -	     $crond_sh restart  >>$wdtlog +	     $restart_cron >>$wdtlog  	     touch $LOCKFILE  	   fi -        fi +	fi  	echo  	return $RETVAL  } @@ -79,16 +67,13 @@ stop() {  	$prog -d  >>$wdtlog  	RETVAL=$?  	# now remove the wdt cron job -        # crontab -l >$tmpcron -        # grep -v $prog $tmpcron |grep -v "^#" >$tmpcron2 -        # crontab $tmpcron2 -        rm -f $wdtcron +	rm -f $wdtcron  	# make crond re-read the /etc/cron.d -	$crond_sh restart >>$wdtlog +    $restart_cron >>$wdtlog  	rm -f ${LOCKFILE}  	echo  	return $RETVAL -}	 +}  restart() {    	stop @@ -113,12 +98,13 @@ get_status() {  }  # Begin mainline script here -if [ -f /etc/redhat-release ] -then -   crond_sh=/etc/init.d/crond +if [ -x /bin/systemctl ]; then +   restart_cron='systemctl restart crond.service' +elif [ -f /etc/redhat-release ]; then +   restart_cron='/etc/init.d/crond  restart'  else     # SuSE, MontaVista, etc. -   crond_sh=/etc/init.d/cron +   restart_cron='/etc/init.d/cron  restart'  fi  if [ ! -d /var/lock/subsys ]; then     LOCKFILE=/var/run/$name.pid @@ -6,7 +6,7 @@  #    [doinc?] is 'n'.  #    if [doinc?] is 'r', reverse increment (decrement).  # -ver=3.0.1 +ver=3.0.2  rel=1  tmped=/tmp/edver.tmp  tmpspec=/tmp/edspec.tmp diff --git a/util/Makefile.am b/util/Makefile.am index 583cbe5..3293943 100644 --- a/util/Makefile.am +++ b/util/Makefile.am @@ -23,7 +23,7 @@ CMDMOD += ipmilanplus.c  # CMDMOD = ipmicmd.c mem_if.c @OS_DRIVERS@  # am: configure substitutions are not allowed in _SOURCES variables  LIBOBJ = ipmicmd.o mem_if.o ipmidir.o imbapi.o ipmimv.o ipmild.o ipmibmc.o ipmilipmi.o subs.o md5.o md2.o $(tmpobj)/ipmilan.o $(tmpobj)/ipmilanplus.o @LIBSENSORS@ -OEMMOD = oem_kontron.c oem_fujitsu.c oem_intel.c oem_sun.c oem_supermicro.c oem_dell.c oem_quanta.c oem_hp.c oem_newisys.c oem_lenovo.c iekanalyzer.c  +OEMMOD = oem_kontron.c oem_fujitsu.c oem_intel.c oem_sun.c oem_supermicro.c oem_dell.c oem_quanta.c oem_hp.c oem_newisys.c oem_lenovo.c oem_asus.c iekanalyzer.c  L2OBJ = @SAM2OBJ@  AM_CPPFLAGS += -I. -I.. -DMETACOMMAND  diff --git a/util/Makefile.in b/util/Makefile.in index bf37fdf..30be248 100644 --- a/util/Makefile.in +++ b/util/Makefile.in @@ -73,7 +73,7 @@ ipmi_sample_evt_DEPENDENCIES = $(am__DEPENDENCIES_1)  am__objects_1 = oem_kontron.$(OBJEXT) oem_fujitsu.$(OBJEXT) \  	oem_intel.$(OBJEXT) oem_sun.$(OBJEXT) oem_supermicro.$(OBJEXT) \  	oem_dell.$(OBJEXT) oem_quanta.$(OBJEXT) oem_hp.$(OBJEXT) \ -	oem_newisys.$(OBJEXT) oem_lenovo.$(OBJEXT) \ +	oem_newisys.$(OBJEXT) oem_lenovo.$(OBJEXT) oem_asus.$(OBJEXT) \  	iekanalyzer.$(OBJEXT)  am__objects_2 = ipmicmd.$(OBJEXT) mem_if.$(OBJEXT) ipmidir.$(OBJEXT) \  	imbapi.$(OBJEXT) ipmimv.$(OBJEXT) ipmild.$(OBJEXT) \ @@ -295,7 +295,7 @@ CMDMOD = ipmicmd.c mem_if.c ipmidir.c imbapi.c ipmimv.c ipmild.c \  # CMDMOD = ipmicmd.c mem_if.c @OS_DRIVERS@  # am: configure substitutions are not allowed in _SOURCES variables  LIBOBJ = ipmicmd.o mem_if.o ipmidir.o imbapi.o ipmimv.o ipmild.o ipmibmc.o ipmilipmi.o subs.o md5.o md2.o $(tmpobj)/ipmilan.o $(tmpobj)/ipmilanplus.o @LIBSENSORS@ -OEMMOD = oem_kontron.c oem_fujitsu.c oem_intel.c oem_sun.c oem_supermicro.c oem_dell.c oem_quanta.c oem_hp.c oem_newisys.c oem_lenovo.c iekanalyzer.c  +OEMMOD = oem_kontron.c oem_fujitsu.c oem_intel.c oem_sun.c oem_supermicro.c oem_dell.c oem_quanta.c oem_hp.c oem_newisys.c oem_lenovo.c oem_asus.c iekanalyzer.c  L2OBJ = @SAM2OBJ@  METASOURCE = ipmiutil.c ialarms.c ihealth.c ievents.c ifru.c ifru_picmg.c igetevent.c ireset.c icmd.c ilan.c isensor.c isel.c iserial.c iwdt.c isol.c idiscover.c iconfig.c ipicmg.c ifirewall.c ifwum.c ihpm.c itsol.c idcmi.c $(OEMMOD) $(CMDMOD)   LANPLUS_OBJ = $(shell ar t @LANPLUS_LIB@ 2>/dev/null)  @@ -480,6 +480,7 @@ distclean-compile:  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md2.Po@am__quote@  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Po@am__quote@  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mem_if.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oem_asus.Po@am__quote@  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oem_dell.Po@am__quote@  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oem_fujitsu.Po@am__quote@  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oem_hp.Po@am__quote@ diff --git a/util/ialarms.c b/util/ialarms.c index afa8073..3fa821b 100644 --- a/util/ialarms.c +++ b/util/ialarms.c @@ -75,7 +75,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  /*   * Global variables    */ -static char * progver   = "3.01"; +static char * progver   = "3.02";  static char * progname  = "ialarms";  static char   fdebug    = 0;  static char   fbmctam   = 0; diff --git a/util/icmd.c b/util/icmd.c index 04763ae..d2f7508 100644 --- a/util/icmd.c +++ b/util/icmd.c @@ -78,7 +78,7 @@ extern void ipmi_lan_set_timeout(int ipmito, int tries, int pingto);  /*   * Global variables    */ -static char * progver   = "3.01"; +static char * progver   = "3.02";  static char * progname  = "icmd";  static char   fdebug    = 0;  static char   fquiet    = 0; diff --git a/util/iconfig.c b/util/iconfig.c index ede54ff..dd43225 100644 --- a/util/iconfig.c +++ b/util/iconfig.c @@ -172,7 +172,7 @@ typedef struct  /*   * Global variables    */ -static char * progver   = "3.01"; +static char * progver   = "3.02";  static char * progname  = "iconfig";  static char   fdebug    = 0;  static char   fipmilan  = 0; diff --git a/util/idcmi.c b/util/idcmi.c index 65342d6..fcadbac 100644 --- a/util/idcmi.c +++ b/util/idcmi.c @@ -62,7 +62,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  #include "idcmi.h"  static char * progname  = "idcmi"; -static char * progver   = "3.01"; +static char * progver   = "3.02";  extern char   fdebug;  /*from ipmicmd.c*/  static uchar  g_bus  = PUBLIC_BUS;  static uchar  g_sa   = BMC_SA; diff --git a/util/ievents.c b/util/ievents.c index 1e7f8e2..284343b 100644 --- a/util/ievents.c +++ b/util/ievents.c @@ -76,7 +76,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  #define  SELprintf  printf    #define  SMS_SA   0x41  #define  SMI_SA   0x21 -static char *progver   = "3.01"; +static char *progver   = "3.02";  static char *progname  = "ievents";  static char fsensdesc = 0;   /* 1= get extended sensor descriptions*/  static char fcanonical = 0;  /* 1= show canonical, delimited output*/ @@ -397,7 +397,7 @@ char * avail_str[N_AVAIL] = {  /* Discrete Availability, evtype 0x0A */   /*08*/ "Install Error"}; -#define NSDESC   87   +#define NSDESC   88    struct {   ushort genid;  /* generator id: BIOS, BMC, etc. (slave_addr/channel) */   uchar s_typ;   /* 1=temp,2=voltage,4=fan,... */ @@ -457,9 +457,10 @@ struct {  {HSC_SA,0x0d, 0xff, 0x08, 0x01,0xff,0xff, 0,"Device Inserted"},   /*HSC*/  {0xffff,0x0d, 0xff, 0x6f, 0x00,0xff,0xff, 0,"Drive present"},   /*Romley BMC*/  {0xffff,0x0d, 0xff, 0xef, 0x00,0xff,0xff, 0,"Drive removed"},   /*BMC*/ -{0xffff,0x0d, 0xff, 0x6f, 0x01,0xff,0xff, 2,"Drive fault"},   +{0xffff,0x0d, 0xff, 0x6f, 0x01,0xff,0xff, 2,"Drive fault"},    /*0x0D Drive*/  {0xffff,0x0d, 0xff, 0xef, 0x01,0xff,0xff, 0,"Drive fault OK"},    {0xffff,0x0d, 0xff, 0x6f, 0x02,0xff,0xff, 1,"Drive predict fail"}, +{0xffff,0x0d, 0xff, 0x6f, 0x05,0xff,0xff, 1,"Drive not redundant"},  {0xffff,0x0d, 0xff, 0x6f, 0x07,0xff,0xff, 0,"Rebuild in progress"},  {0xffff,0x0d, 0xff, 0xef, 0x07,0xff,0xff, 0,"Rebuild complete"},     {0xffff,0x14, 0xff, 0xff, 0x42,0xff,0xff, 1,"Reset Button pressed"}, diff --git a/util/ifirewall.c b/util/ifirewall.c index 7938cd9..25954e5 100644 --- a/util/ifirewall.c +++ b/util/ifirewall.c @@ -64,7 +64,7 @@  /* global variables */  static char * progname  = "ifirewall"; -static char * progver   = "3.01"; +static char * progver   = "3.02";  static char   fdebug    = 0;  static uchar  g_bus  = PUBLIC_BUS;  static uchar  g_sa   = BMC_SA; diff --git a/util/ifru.c b/util/ifru.c index f9d35df..9ddfd8b 100644 --- a/util/ifru.c +++ b/util/ifru.c @@ -116,7 +116,7 @@ extern int ipmi_kontronoem_main(void * intf, int  argc, char ** argv);  #endif  static char *progname  = "ifru"; -static char *progver   = "3.01"; +static char *progver   = "3.02";  static int  vend_id = 0;   static int  prod_id = 0;   static char fdebug = 0; diff --git a/util/ifruset.c b/util/ifruset.c index 360b84b..b29800d 100644 --- a/util/ifruset.c +++ b/util/ifruset.c @@ -106,7 +106,7 @@ extern void fmt_time(time_t etime, char *buf, int bufsz); /*see ievents.c*/  #define IPROD_OEM    7  static char *progname  = "ifruset"; -static char *progver   = "3.01"; +static char *progver   = "3.02";  static char fdebug = 0;  static char fpicmg = 0;  static char fonlybase = 0; diff --git a/util/igetevent.c b/util/igetevent.c index 4b0de05..49476bd 100644 --- a/util/igetevent.c +++ b/util/igetevent.c @@ -169,7 +169,7 @@ extern void free_sdr_cache(uchar *pret); /*see isensor.c*/   * Global variables    */  static char * progname  = "igetevent"; -static char * progver   = "3.01"; +static char * progver   = "3.02";  static char   fdebug    = 0;  static char   fipmilan  = 0;  static char   frunonce  = 0; diff --git a/util/ihealth.c b/util/ihealth.c index db228bf..2ff5ba8 100644 --- a/util/ihealth.c +++ b/util/ihealth.c @@ -82,7 +82,7 @@ extern int oem_supermicro_get_firmware_str(char *pstr, int sz); /*oem_supermicro   * Global variables    */  static char * progname  = "ihealth"; -static char * progver   = "3.01"; +static char * progver   = "3.02";  static char   fdebug    = 0;  static char   fipmilan  = 0;  static char   fcanonical = 0; @@ -634,11 +634,6 @@ void show_devid_all(int dtype, uchar *devrec, int sdevrec)  	     if (prod >= 0x200) prodstr = "(iRMC S2)";   	     else prodstr = "";               break; -         case VENDOR_LENOVO:  -         case VENDOR_LENOVO2:  -	     	if (prod == 0x143) prodstr = "(x3650 M4)";  -	     	else prodstr = ""; -         	break;           case VENDOR_CISCO:      /*=0x00168b, 5771.*/  	     if (prod == 0x0005) prodstr = "(UCS C200)";   	     else prodstr = ""; @@ -731,12 +726,12 @@ void show_devid_all(int dtype, uchar *devrec, int sdevrec)               switch(prod) {     /* show product names for some */                   case 0x2000:   prodstr = "(Proliant ML/DL)"; break; /*DL380*/                   case 0x2020:   prodstr = "(Proliant BL)"; break; -                 default:  if ((prod & 0xff00) == 0x8300)  -				prodstr = "(Proliant SL)"; -			   else prodstr = "";  -			   break; +                 default:   +                   if ((prod & 0xff00) == 0x8300) prodstr = "(Proliant SL)"; +                   else prodstr = "";  +                   break;               } -	     do_powerstate = 0; /*HP does not support get_power_state cmd*/ +             do_powerstate = 0; /*HP does not support get_power_state cmd*/               break;           case VENDOR_DELL:        /*=0x0002A2*/               switch(prod) {     /* show product names for some */ @@ -785,11 +780,18 @@ void show_devid_all(int dtype, uchar *devrec, int sdevrec)                   default:       prodstr = ""; break;               }               break; +         case VENDOR_LENOVO:  +         case VENDOR_LENOVO2:  +	     	if (prod == 0x143) prodstr = "(x3650 M4)";  +	     	else prodstr = ""; +         	break;           case VENDOR_IBM:    /*=0x0002*/               switch(prod) {     /* show product names for some */ -		 case 0x000e:   prodstr = "(x3755)"; break; -		 case 0x00dc:   prodstr = "(x3650)"; break; -		 case 0x8848:   prodstr = "(eServer 360S)"; break; +             case 0x000e:   prodstr = "(x3755)"; break; +             case 0x0011:   prodstr = "(x3650)"; break; +             case 0x00dc:   prodstr = "(x3650 M2)"; break; /*M2,M3*/ +             case 0x00fa:   prodstr = "(x3850 X5)"; break; +             case 0x8848:   prodstr = "(eServer 360S)"; break;                   default:       prodstr = ""; break;               }               break; diff --git a/util/ilan.c b/util/ilan.c index 0c47e4d..6f4d448 100644 --- a/util/ilan.c +++ b/util/ilan.c @@ -305,7 +305,7 @@ extern char *get_sensor_type_desc(uchar stype);  /*from ievents.c*/  /*   * Global variables    */ -static char * progver   = "3.01"; +static char * progver   = "3.02";  static char * progname  = "ilan";  static char   fdebug    = 0;  static char   fipmilan  = 0; diff --git a/util/ipicmg.c b/util/ipicmg.c index 735ad87..b0f1a03 100644 --- a/util/ipicmg.c +++ b/util/ipicmg.c @@ -81,7 +81,7 @@  /* Global data */  static char * progname  = "ipicmg"; -static char * progver   = "3.01"; +static char * progver   = "3.02";  static char   fdebug    = 0;  static char   fset_mc   = 0;  static uint8_t g_bus  = PUBLIC_BUS; diff --git a/util/ipmicmd.h b/util/ipmicmd.h index 9e13d4e..5fccaea 100644 --- a/util/ipmicmd.h +++ b/util/ipmicmd.h @@ -314,6 +314,7 @@ struct oemvalstr {  #define VENDOR_CISCO     5771      /*=0x168B*/  #define VENDOR_LENOVO    0x004A66  #define VENDOR_LENOVO2   0x004F4D +#define VENDOR_ASUS      0x000A3F  #define PRODUCT_QUANTA_S99Q   21401  #define PRODUCT_QUANTA_QSSC_S4R  64  /*0x0040*/ diff --git a/util/ipmiutil.c b/util/ipmiutil.c index 43acf40..5fec907 100644 --- a/util/ipmiutil.c +++ b/util/ipmiutil.c @@ -57,7 +57,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  #include "ipmiutil.h"  static char *progname  = "ipmiutil"; -static char *progver   = "3.01"; +static char *progver   = "3.02";  // static char fdebug = 0;  /*int ipmiutil(int argc, char **argv); */ diff --git a/util/ipmiutil.mak b/util/ipmiutil.mak index 021851a..c3963a0 100644 --- a/util/ipmiutil.mak +++ b/util/ipmiutil.mak @@ -86,6 +86,7 @@ E_OBJ=$(TMP_D)\ipmiutil.obj \        $(TMP_D)\iekanalyzer.obj $(TMP_D)\ifru_picmg.obj \
        $(TMP_D)\oem_kontron.obj $(TMP_D)\ihpm.obj $(TMP_D)\ifwum.obj \
        $(TMP_D)\oem_fujitsu.obj $(TMP_D)\oem_intel.obj $(TMP_D)\oem_lenovo.obj \
 +      $(TMP_D)\oem_asus.obj  \
        $(TMP_D)\oem_sun.obj     $(TMP_D)\oem_dell.obj $(TMP_D)\oem_hp.obj \
        $(TMP_D)\oem_supermicro.obj   $(TMP_D)\itsol.obj $(TMP_D)\idcmi.obj \
        $(TMP_D)\oem_quanta.obj  $(TMP_D)\oem_newisys.obj  $(CMD_OBJ) mem_if.obj
 @@ -333,6 +334,9 @@ $(TMP_D)\oem_supermicro.obj:    oem_supermicro.c  $(TMP_D)\oem_lenovo.obj:    oem_lenovo.c
      $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\oem_lenovo.obj oem_lenovo.c
 +$(TMP_D)\oem_asus.obj:    oem_asus.c
 +    $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\oem_asus.obj oem_asus.c
 +
  $(TMP_D)\oem_quanta.obj:    oem_quanta.c
      $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\oem_quanta.obj oem_quanta.c
 diff --git a/util/ipmiutil64.mak b/util/ipmiutil64.mak index 27f0a50..6c8825e 100644 --- a/util/ipmiutil64.mak +++ b/util/ipmiutil64.mak @@ -86,6 +86,7 @@ E_OBJ=$(TMP_D)\ipmiutil.obj \        $(TMP_D)\iekanalyzer.obj $(TMP_D)\ifru_picmg.obj \
        $(TMP_D)\oem_kontron.obj $(TMP_D)\ihpm.obj $(TMP_D)\ifwum.obj \
        $(TMP_D)\oem_fujitsu.obj $(TMP_D)\oem_intel.obj $(TMP_D)\oem_lenovo.obj \
 +      $(TMP_D)\oem_asus.obj  \
        $(TMP_D)\oem_sun.obj     $(TMP_D)\oem_dell.obj $(TMP_D)\oem_hp.obj \
        $(TMP_D)\oem_supermicro.obj   $(TMP_D)\itsol.obj $(TMP_D)\idcmi.obj \
        $(TMP_D)\oem_quanta.obj  $(TMP_D)\oem_newisys.obj  $(CMD_OBJ) mem_if.obj
 @@ -333,6 +334,9 @@ $(TMP_D)\oem_supermicro.obj:    oem_supermicro.c  $(TMP_D)\oem_lenovo.obj:    oem_lenovo.c
      $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\oem_lenovo.obj oem_lenovo.c
 +$(TMP_D)\oem_asus.obj:    oem_asus.c
 +    $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\oem_asus.obj oem_asus.c
 +
  $(TMP_D)\oem_quanta.obj:    oem_quanta.c
      $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\oem_quanta.obj oem_quanta.c
 diff --git a/util/ireset.c b/util/ireset.c index d0d30de..434676f 100644 --- a/util/ireset.c +++ b/util/ireset.c @@ -108,7 +108,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  /*   * Global variables    */ -static char * progver   = "3.01"; +static char * progver   = "3.02";  static char * progname  = "ireset";  static uchar  ipmi_maj;  static uchar  ipmi_min; diff --git a/util/isel.c b/util/isel.c index 909e28c..83752eb 100644 --- a/util/isel.c +++ b/util/isel.c @@ -162,7 +162,7 @@ typedef struct  #define RDATA_OFFSET    13    //byte offset to the record event data    static char *progname  = "isel"; -static char *progver   = "3.01"; +static char *progver   = "3.02";  #ifdef WIN32  #define IDXFILE   "sel.idx"  static char idxfile[80] = IDXFILE; diff --git a/util/iseltime.c b/util/iseltime.c index a61fd34..ba0013d 100644 --- a/util/iseltime.c +++ b/util/iseltime.c @@ -75,7 +75,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  /*   * Global variables    */ -static char * progver   = "3.01"; +static char * progver   = "3.02";  static char * progname  = "iseltime";  static char   fdebug    = 0;  static char   fset      = 0; diff --git a/util/isensor.c b/util/isensor.c index 9456613..7dd746e 100644 --- a/util/isensor.c +++ b/util/isensor.c @@ -168,6 +168,7 @@ extern int decode_sensor_dell(uchar *sdr,uchar *reading,char *pstring,  				int slen);  /*see oem_dell.c*/  extern int decode_sensor_lenovo(uchar *sdr,uchar *reading,char *pstring,  				int slen);  /*see oem_lenovo.c*/ +extern int decode_sensor_asus(uchar *sdr,uchar *reading,char *pstring,int slen);  extern int decode_sensor_hp(uchar *sdr,uchar *reading,char *pstring,  				int slen);  /*see oem_hp.c*/  extern void show_oemsdr_hp(uchar *sdr);  @@ -254,7 +255,7 @@ char *decode_entity_id(int id) {   *  Global Data   ************************/  static char *progname  = "isensor"; -static char *progver   = "3.01"; +static char *progver   = "3.02";  #ifdef WIN32  static char savefile[] = "%ipmiutildir%\\thresholds.cmd";  #else @@ -1962,14 +1963,18 @@ int decode_oem_sensor(uchar *sdr,uchar *reading,char *pstring,int slen)        case VENDOR_DELL:             rv = decode_sensor_dell(sdr, reading, pstring, slen);            break; +      case VENDOR_IBM:         case VENDOR_LENOVO:         case VENDOR_LENOVO2:             rv = decode_sensor_lenovo(sdr, reading, pstring, slen);            break; +      case VENDOR_ASUS:  +          rv = decode_sensor_asus(sdr, reading, pstring, slen); +          break;        default:  	  break;     } /*end-switch vend_id*/ -   if (fdebug && rv == 0) +   if (fdebug) // && rv == 0)        printf("decode_oem_sensor rv=%d vend=%x string=%s\n",rv,vend_id,pstring);  #endif     return (rv); @@ -2363,7 +2368,7 @@ decode_comp_reading(uchar type, uchar evtype, uchar num,                   if (reading1 & 0x02) istr = 9;   /*Present/Inserted*/                   else if (reading1 & 0x01) istr = 10; /*Absent/Removed*/                   else /*reading1==00*/ istr = 47; /*Unused*/ -              } else {        /* HSC slot status sensors (evtype==0x6f) */ +	      } else { /* HSC slot status sensors (evtype==0x6f)*/                   /* usually reading2 == 0x82 or 0x8E if healthy */                   if (reading2 & 0x01) istr = 12; /*state8=Rebuild stopped*/                   else if (reading2 & 0x02) istr = 11; /*state9=Inserted/Ready */ @@ -2371,7 +2376,7 @@ decode_comp_reading(uchar type, uchar evtype, uchar num,                   else if (reading2 & 0x08) istr = 11; /*state11=Ready */                   else if (reading2 == 0x80) istr = 47; /*no states, Unused*/                   else istr = 12;  /*faulty*/ -		 b = 8;  /*if no bits set, no raid state */ +                 b = 8;  /*if no bits set, no raid state */                   if (reading1 & 0x01) { b = 0; } /*state0=Faulty*/                   else if (reading1 & 0x02) b = 1; /*state1=Rebuilding*/                   else if (reading1 & 0x04) b = 2; /*state2=InFailedArray*/ @@ -2380,15 +2385,15 @@ decode_comp_reading(uchar type, uchar evtype, uchar num,                   else if (reading1 & 0x20) b = 5; /*state5=PredictedFault*/                   else if (reading1 & 0x40) b = 6; /*state6=Un-configured*/                   else if (reading1 & 0x80) b = 7; /*state7=HotSpare*/ -		 if (b < 8) {  +                 if (b < 8) {   		     /* also include a raid_state, via custom string */  		     sprintf(customstr,"%s %s",  				sensor_dstatus[istr], raid_states[b]);  		     istr = STR_CUSTOM;  		     sensor_dstatus[istr] = customstr;  		     if (fdebug) printf("dstatus=%s\n",sensor_dstatus[istr]); -		 } -              } /*end-else HSC slot status*/ +                 } +              } /*end-else-if HSC slot status (0x6f)*/             }   	   break;  	case 0x10:	/*Event Logging*/ @@ -2662,7 +2667,8 @@ ShowSDR(char *tag, uchar *sdr)  	}  	rc = decode_oem_sensor(sdr,sens,oem_string,sizeof(oem_string));  	if (rc == 0) { -	   strncpy(rdgstr,oem_string,sizeof(rdgstr)); +	   if (fsimple) strncpy(rdgstr,oem_string,sizeof(rdgstr)); +	   else snprintf(rdgstr,sizeof(rdgstr),"%02x %s",sens[0],oem_string);  	} else {  	   if (fsimple)   	      snprintf(rdgstr,sizeof(rdgstr),"%s %c %.2f %s", diff --git a/util/iserial.c b/util/iserial.c index e0cc7e9..14de25c 100644 --- a/util/iserial.c +++ b/util/iserial.c @@ -155,7 +155,7 @@ typedef struct  /*   * Global variables    */ -static char * progver   = "3.01"; +static char * progver   = "3.02";  static char * progname  = "iserial";  static int    vend_id = 0;  static int    prod_id = 0; diff --git a/util/isol.c b/util/isol.c index 0dd7f22..6fc13f8 100644 --- a/util/isol.c +++ b/util/isol.c @@ -165,7 +165,7 @@ void dbglog( char *pattn, ... ); /*local prototype*/  /*   * Global variables    */ -static char * progver   = "3.01"; +static char * progver   = "3.02";  static char * progname  = "isol";  static char  fdebug        = 0;  static char  fpicmg        = 0; diff --git a/util/itsol.c b/util/itsol.c index 67ff688..540b73b 100644 --- a/util/itsol.c +++ b/util/itsol.c @@ -98,7 +98,7 @@ int   gettimeofday(struct timeval *tv, struct timezone *tz);  extern int verbose;  extern char   fdebug;  /*from ipmicmd.c*/  static char * progname  = "itsol"; -static char * progver   = "3.01"; +static char * progver   = "3.02";  static uchar  g_bus  = PUBLIC_BUS;  static uchar  g_sa   = BMC_SA;  static uchar  g_lun  = BMC_LUN; diff --git a/util/iwdt.c b/util/iwdt.c index 121270a..89f4c52 100644 --- a/util/iwdt.c +++ b/util/iwdt.c @@ -100,7 +100,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  /*   * Global variables    */ -static char * progver   = "3.01"; +static char * progver   = "3.02";  static char * progname  = "iwdt";  static char   fdebug    = 0;  static char   fdontlog  = 0; diff --git a/util/oem_asus.c b/util/oem_asus.c new file mode 100644 index 0000000..24226b9 --- /dev/null +++ b/util/oem_asus.c @@ -0,0 +1,278 @@ +/* + * oem_asus.c + * Handle ASUS OEM command functions  + * + * Author:  Andy Cress  arcress at users.sourceforge.net + * Change history: + *  01/23/2017 ARCress - created + * + *--------------------------------------------------------------------- + */ +/*M* +Copyright (c) 2016 Andy Cress +All rights reserved. + +Redistribution and use in source and binary forms, with or without  +modification, are permitted provided that the following conditions are met: + +  a.. Redistributions of source code must retain the above copyright notice,  +      this list of conditions and the following disclaimer.  +  b.. Redistributions in binary form must reproduce the above copyright notice, +      this list of conditions and the following disclaimer in the documentation  +      and/or other materials provided with the distribution.  +  c.. Neither the name of the copyright holder nor the names of contributors  +      may be used to endorse or promote products derived from this software  +      without specific prior written permission.  + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND  +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED  +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE  +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR  +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES  +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON  +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT  +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS  +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *M*/ +#ifdef WIN32 +#include <windows.h> +#include "getopt.h" +#else +#if defined(HPUX) +/* getopt is defined in stdio.h */ +#elif defined(MACOS) +/* getopt is defined in unistd.h */ +#include <unistd.h> +#include <sys/time.h> +#else +#include <getopt.h> +#endif +#endif +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <time.h> +#include "ipmicmd.h" +#include "ievents.h" + +extern uchar bitnum(ushort value);  /*isensor.c*/ +extern char fdebug;  /*ipmicmd.c*/ +void set_loglevel(int level);  /*prototype */ + +static char * progver   = "3.02"; +static char * progname  = "ioemasus"; +static int verbose = 0; +static uchar  g_bus  = PUBLIC_BUS; +static uchar  g_sa   = BMC_SA; +static uchar  g_lun  = BMC_LUN; +static uchar  g_addrtype = ADDR_SMI; +static int vend_id = 0; +static int prod_id = 0; + +/* + * decode_sensor_asus + * inputs: + *    sdr     = the SDR buffer + *    reading = the 3 or 4 bytes of data from GetSensorReading + *    pstring = points to the output string buffer + *    slen    = size of the output buffer + * outputs: + *    rv     = 0 if this sensor was successfully interpreted here, + *             non-zero otherwise, to use default interpretations. + *    pstring = contains the sensor reading interpretation string (if rv==0) + */ +int decode_sensor_asus(uchar *sdr,uchar *reading,char *pstring, int slen) +{ +   int rv = -1; +   uchar stype, etype, entity; +   uchar bval; +   ushort rval; +   char *pstr = NULL; +   int b; + +   if (sdr == NULL || reading == NULL) return(rv); +   if (pstring == NULL || slen == 0) return(rv); +   /* sdr[3] is 0x01 for Full, 0x02 for Compact */ +   bval = reading[2]; +   if (sdr[3] == 0x01) return(rv); /*skip if full sensor*/ +   entity = sdr[8]; +   stype = sdr[12]; +   etype = sdr[13]; +   rval = reading[2] | ((reading[3] & 0x7f) << 8); +   b = bitnum(rval); +   if (fdebug) printf("oem_asus: sensor type=%x evt=%x entity=%x rval=%04x\n", +					stype,etype,entity,rval); +   switch(stype) { +       case 0xC5:      /* OEM for Memory_Train_Err */ +           if (etype == 0x6F) { +              switch(bval) { +              case 0x00: pstr = "OK"; break; +              default: pstr = "Error"; break; +              } +              snprintf(pstring,slen,"%s",pstr); +              rv = 0; +           } +           break; +       default: break; +   } +   return(rv); +} + +/* + * decode_sel_asus + * inputs: + *    evt    = the 16-byte IPMI SEL event + *    outbuf = points to the output string buffer + *    outsz  = size of the output buffer + * outputs: + *    rv     = 0 if this event was successfully interpreted here, + *             non-zero otherwise, to use default interpretations. + *    outbuf = will contain the interpreted event text string (if rv==0) + */ +int decode_sel_asus(uchar *evt, char *outbuf, int outsz, char fdesc, +                        char fdbg) +{ +   int rv = -1; +   ushort id; +   uchar rectype; +   ulong timestamp; +   char mybuf[64];  +   char *type_str = ""; +   char *pstr = NULL; +   int sevid; +   ushort genid; +   uchar snum; +   uchar data1, data2, data3; +          +   fdebug = fdbg; +   sevid = SEV_INFO; +   id = evt[0] + (evt[1] << 8); +   rectype = evt[2]; +   snum = evt[11]; +   timestamp = evt[3] + (evt[4] << 8) + (evt[5] << 16) + (evt[6] << 24); +   genid = evt[7] | (evt[8] << 8); +   data1 = evt[13]; +   data2 = evt[14]; +   data3 = evt[15]; +   if (rectype == 0x02)  +   { +     sprintf(mybuf,"%02x [%02x %02x %02x]", evt[12],data1,data2,data3); +     switch(evt[10]) {  /*sensor type*/ +     case 0xC0:      /* OEM type */ +		type_str = "OEM_type"; +		pstr = "OEM Sensor   ";  +		sevid = SEV_MAJ;  +		rv = -1; +		break; +     default: /*other sensor types*/ +		break; +     } +   } +   if (rv == 0) { +	 format_event(id,timestamp, sevid, genid, type_str, +			snum,NULL,pstr,mybuf,outbuf,outsz); +   } +   return(rv); +} + +static void usage(void) +{ +   printf("Usage: %s <command> [arg]\n",progname); +   printf("These commands may not work on all Lenovo systems\n"); +} + +static int ipmi_oemasus_main(int  argc, char **argv) +{ +   int rv = 0; + +   if (strncmp(argv[0],"other",9) == 0) { +      usage(); +      rv = ERR_USAGE; +   } else { +      usage(); +      rv = ERR_USAGE; +   } +   return(rv); +} + +#ifdef METACOMMAND +int i_oemasus(int argc, char **argv) +#else +#ifdef WIN32 +int __cdecl +#else +int +#endif +main(int argc, char **argv) +#endif +{ +   int rv = 0; +   uchar devrec[16]; +   int c, i; +   char *s1; + +   printf("%s ver %s\n", progname,progver); +   set_loglevel(LOG_NOTICE); +   parse_lan_options('V',"4",0);  /*default to admin priv*/ + +   while ( (c = getopt( argc, argv,"m:xzEF:J:N:P:R:T:U:V:YZ:?")) != EOF ) +      switch(c) { +          case 'm': /* specific IPMB MC, 3-byte address, e.g. "409600" */ +                    g_bus = htoi(&optarg[0]);  /*bus/channel*/ +                    g_sa  = htoi(&optarg[2]);  /*device slave address*/ +                    g_lun = htoi(&optarg[4]);  /*LUN*/ +                    g_addrtype = ADDR_IPMB; +                    if (optarg[6] == 's') { +                             g_addrtype = ADDR_SMI;  s1 = "SMI"; +                    } else { g_addrtype = ADDR_IPMB; s1 = "IPMB"; } +                    ipmi_set_mc(g_bus,g_sa,g_lun,g_addrtype); +                    printf("Use MC at %s bus=%x sa=%x lun=%x\n", +                            s1,g_bus,g_sa,g_lun); +                    break; +          case 'x': fdebug = 2; /* normal (dbglog if isol) */ +                    verbose = 1; +                    break; +          case 'z': fdebug = 3; /*full debug (for isol)*/ +                    verbose = 1; +                    break; +          case 'N':    /* nodename */ +          case 'U':    /* remote username */ +          case 'P':    /* remote password */ +          case 'R':    /* remote password */ +          case 'E':    /* get password from IPMI_PASSWORD environment var */ +          case 'F':    /* force driver type */ +          case 'T':    /* auth type */ +          case 'J':    /* cipher suite */ +          case 'V':    /* priv level */ +          case 'Y':    /* prompt for remote password */ +          case 'Z':    /* set local MC address */ +                parse_lan_options(c,optarg,fdebug); +                break; +          default: +		usage(); +		return(ERR_USAGE); +                break; +      } +   for (i = 0; i < optind; i++) { argv++; argc--; } +   if (argc == 0) { +	usage(); +	return(ERR_USAGE); +   } + +   rv = ipmi_getdeviceid(devrec,16,fdebug); +   if (rv == 0) { +      char ipmi_maj, ipmi_min; +      ipmi_maj = devrec[4] & 0x0f; +      ipmi_min = devrec[4] >> 4; +      vend_id = devrec[6] + (devrec[7] << 8) + (devrec[8] << 16); +      prod_id = devrec[9] + (devrec[10] << 8); +      show_devid( devrec[2],  devrec[3], ipmi_maj, ipmi_min); +   } + +   rv = ipmi_oemasus_main(argc, argv); + +   ipmi_close_(); +   return(rv); +} +/* end oem_asus.c */ diff --git a/util/oem_dell.c b/util/oem_dell.c index 0389355..c806e94 100644 --- a/util/oem_dell.c +++ b/util/oem_dell.c @@ -132,7 +132,7 @@ char NIC_Selection_Mode_String_12g[] [50] =	{  						"shared with failover all loms"  						}; -static char * progver   = "3.01"; +static char * progver   = "3.02";  static char * progname  = "idelloem";  static int verbose = 0;  static char fdebug = 0; @@ -5445,8 +5445,8 @@ int decode_sensor_dell(uchar *sdr,uchar *reading,char *pstring, int slen)     if (stype == 0x02) {  /* Discrete Voltage */        /* Dell Discrete Voltage is opposite from normal */        if (evtype == 0x03) {   /*oem interpretation */ -	 if (reading[2] & 0x01) strncpy(pstring,"OK",slen);  -	 else      strncpy(pstring,"Exceeded",slen); /*LimitExceeded*/ +         if (reading[2] & 0x01) strncpy(pstring,"OK",slen);  +         else      strncpy(pstring,"Exceeded",slen); /*LimitExceeded*/           rv = 0;        }     } diff --git a/util/oem_kontron.c b/util/oem_kontron.c index 259fbdc..891075a 100644 --- a/util/oem_kontron.c +++ b/util/oem_kontron.c @@ -943,19 +943,19 @@ int decode_sel_kontron(uint8_t *evt, char *outbuf, int outsz, char fdesc,     if (rectype == 0xc1) {  /* OEM type C1 */        oemid = evt[7] + (evt[8] << 8) + (evt[9] << 16);        if (oemid == VENDOR_KONTRON) { -         fmt_time(timestamp, timestr, sizeof(timestr)); -	 type_str = "Kontron"; -         gstr = "BMC "; -	 switch(evt[10]) { -	   case 0x01: -	   default: -		sprintf(mybuf,"OEM Event %02x %02x %02x %02x %02x %02x", +		 fmt_time(timestamp, timestr, sizeof(timestr)); +		 type_str = "Kontron"; +		 gstr = "BMC "; +		 switch(evt[10]) { +		  case 0x01: +		  default: +		  sprintf(mybuf,"OEM Event %02x %02x %02x %02x %02x %02x",  			evt[10], evt[11], evt[12], evt[13], evt[14], evt[15]); -		break; -	 } -         snprintf(outbuf, outsz, "%04x %s %s %s %s %s\n", +		  break; +		 } +		 snprintf(outbuf, outsz, "%04x %s %s %s %s %s\n",                          id,timestr,get_sev_str(sevid), gstr, type_str, mybuf); -	 rv = 0; +		 rv = 0;        } /*endif kontron*/     } else if (rectype == 0x02) {        type_str = ""; diff --git a/util/oem_lenovo.c b/util/oem_lenovo.c index 9c5079f..a1162bb 100644 --- a/util/oem_lenovo.c +++ b/util/oem_lenovo.c @@ -57,12 +57,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  #include "ievents.h"  #include "oem_lenovo.h" +extern uchar bitnum(ushort value);  /*isensor.c*/ +extern char fdebug;  /*ipmicmd.c*/  void set_loglevel(int level);  /*prototype */ -static char * progver   = "3.01"; +static char * progver   = "3.02";  static char * progname  = "ioemlenovo";  static int verbose = 0; -static char fdebug = 0;  static uchar  g_bus  = PUBLIC_BUS;  static uchar  g_sa   = BMC_SA;  static uchar  g_lun  = BMC_LUN; @@ -70,7 +71,6 @@ static uchar  g_addrtype = ADDR_SMI;  static int vend_id = 0;  static int prod_id = 0; -extern uchar bitnum(ushort value);  /*isensor.c*/  /*   * decode_sensor_lenovo @@ -116,7 +116,18 @@ int decode_sensor_lenovo(uchar *sdr,uchar *reading,char *pstring, int slen)                case 0x08: pstr = "Disabled"; break;                default: pstr = "OK*"; break;                } -              snprintf(pstring,slen,"%04x %s",bval,pstr); +              rv = 0; +           } +           break; +       case 0x0D:      /* Disk Drive slots */ +           if (etype == 0x6F) { +              switch(bval) { +              case 0x00: pstr = "Absent"; break; +              case 0x01: pstr = "Present"; break; +              case 0x21: pstr = "NotRedundant"; break; +              case 0x40: pstr = "NotAvailable"; break; /*not initialized*/ +              default: pstr = "Faulty"; break; /*e.g. 0x03*/ +              }                rv = 0;             }             break; @@ -126,7 +137,6 @@ int decode_sensor_lenovo(uchar *sdr,uchar *reading,char *pstring, int slen)                else if (bval & 0x01) pstr = "FirmwareError"; /*bit 0*/                else if ((bval & 0x02) != 0) pstr = "FirmwareHang"; /*bit 1*/                else pstr = "OK*"; -              snprintf(pstring,slen,"%04x %s",bval,pstr);                rv = 0;             }             break; @@ -138,7 +148,6 @@ int decode_sensor_lenovo(uchar *sdr,uchar *reading,char *pstring, int slen)                case 0x02: pstr = "CableError"; break;                default: pstr = "OK*"; break;                } -              snprintf(pstring,slen,"%04x %s",rval,pstr);                rv = 0;             }             break; @@ -148,14 +157,12 @@ int decode_sensor_lenovo(uchar *sdr,uchar *reading,char *pstring, int slen)                case 0x00: pstr = "OK"; break; /*No Media*/                default: pstr = "Asserted"; break;                } -              snprintf(pstring,slen,"%04x %s",rval,pstr);                rv = 0;             }         case 0x21:      /*All PCI Error, PCI 1, Internal RAID, No Op ROM, etc.*/             if (etype == 0x6F) {                 if (bval == 0x00) pstr = "OK";                else pstr = "Fault"; -              snprintf(pstring,slen,"%04x %s",bval,pstr);                rv = 0;             }             break; @@ -180,7 +187,6 @@ int decode_sensor_lenovo(uchar *sdr,uchar *reading,char *pstring, int slen)                case 0x07: pstr = "ChangedOK"; break; /*entity 21,22*/                default: pstr = "_"; break;                } -              snprintf(pstring,slen,"%04x %s",rval,pstr);                rv = 0;             }             break; @@ -188,7 +194,6 @@ int decode_sensor_lenovo(uchar *sdr,uchar *reading,char *pstring, int slen)             if (etype == 0x07) {  			  if ((bval & 0x04) != 0) pstr = "Faulty";   			  else pstr = "OK"; -              snprintf(pstring,slen,"%04x %s",bval,pstr);                rv = 0;             }             break; @@ -196,12 +201,12 @@ int decode_sensor_lenovo(uchar *sdr,uchar *reading,char *pstring, int slen)             if (etype == 0x08) {  			  if ((bval & 0x02) != 0) pstr = "Faulty";   			  else pstr = "OK"; -              snprintf(pstring,slen,"%04x %s",bval,pstr);                rv = 0;             }             break;         default: break;     } +   if (rv == 0) snprintf(pstring,slen,"%s",pstr);     // if (rv == 0) strncpy(pstring, pstr, slen);     return(rv);  } diff --git a/util/oem_sun.c b/util/oem_sun.c index 85b761f..5cedc34 100644 --- a/util/oem_sun.c +++ b/util/oem_sun.c @@ -109,7 +109,7 @@ static const struct valstr sunoem_led_mode_optvals[] = {  /* global variables */  static char * progname  = "isunoem"; -static char * progver   = "3.01"; +static char * progver   = "3.02";  static char   fdebug    = 0;  static uchar  g_bus  = PUBLIC_BUS;  static uchar  g_sa   = BMC_SA; diff --git a/util/oem_supermicro.c b/util/oem_supermicro.c index f3e42dd..d1d1da7 100644 --- a/util/oem_supermicro.c +++ b/util/oem_supermicro.c @@ -68,7 +68,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  void set_loglevel(int level);  /*prototype */  extern char fsm_debug;  /*mem_if.c*/ -static char * progver   = "3.01"; +static char * progver   = "3.02";  static char * progname  = "ismcoem";  static int verbose = 0;  static char fdebug = 0; @@ -463,32 +463,32 @@ int decode_sensor_supermicro(uchar *sdr,uchar *reading,char *pstring, int slen)  	   //if (dbg) printf("supermicro %x sensor reading %x\n",stype,reading);             rv = 0;  	   switch(bval) { -           case 0x0000: pstr = "00_Low";    break; -           case 0x0001: pstr = "01_Medium"; break; -           case 0x0002: pstr = "02_High";   break; -           case 0x0004: pstr = "04_Overheat";   break; -           case 0x0007: pstr = "07_Not Installed";   break; +           case 0x0000: pstr = "Low";    break; +           case 0x0001: pstr = "Medium"; break; +           case 0x0002: pstr = "High";   break; +           case 0x0004: pstr = "Overheat";   break; +           case 0x0007: pstr = "Not Installed";   break;  	   default:  rv = -1;  break;  	   }             break;          case 0x08:  /* Power Supply Status (Full/Discrete) Table 42-3 */            rv = 0;            switch(bval) { -           case 0x00: pstr = "00_Absent"; break;     /*bit 0*/ -           case 0x01: pstr = "01_Present"; break;    /*bit 0*/ -           case 0x02: pstr = "02_Failure"; break;    /*bit 1*/ -           case 0x04: pstr = "04_Predict Fail"; break;  /*bit 2*/ -           case 0x08: pstr = "08_Input Lost"; break;    /*bit 3*/ +           case 0x00: pstr = "Absent"; break;     /*bit 0*/ +           case 0x01: pstr = "Present"; break;    /*bit 0*/ +           case 0x02: pstr = "Failure"; break;    /*bit 1*/ +           case 0x04: pstr = "Predict Fail"; break;  /*bit 2*/ +           case 0x08: pstr = "Input Lost"; break;    /*bit 3*/             default:  rv = -1;  break;            }             break;          case 0x0D:  /* HDD Status (Full/Discrete) Table 42-3 */            rv = 0;            switch(bval) { -             case 0x00: pstr = "00_Absent"; break;     /*bit 0*/ -             case 0x01: pstr = "01_Present"; break;    /*bit 0*/ -             case 0x02: pstr = "02_Failure"; break;    /*bit 1*/ -             case 0x04: pstr = "04_Predict Fail"; break;  /*bit 2*/ +             case 0x00: pstr = "Absent"; break;     /*bit 0*/ +             case 0x01: pstr = "Present"; break;    /*bit 0*/ +             case 0x02: pstr = "Failure"; break;    /*bit 1*/ +             case 0x04: pstr = "Predict Fail"; break;  /*bit 2*/               default:  rv = -1;  break;            }             break; @@ -520,6 +520,7 @@ int decode_mem_supermicro(int prod, uchar b2, uchar b3, char *desc, int *psz)     dimm  = bdata % 10;  #endif     /* ver 0 previous SuperMicro firmware returned all zeros here. +    *        Memory #00 Correctable ECC, <pstr> 6f [00 00 00]      * ver 1 returns data3 with some info (X9)      * ver 2 returns data2 with some info (X9,X10)      * There have been bugs in these SuperMicro events, but this  @@ -548,7 +549,10 @@ int decode_mem_supermicro(int prod, uchar b2, uchar b3, char *desc, int *psz)        if (pair < 0) pair = 0;        if (pair > NPAIRS) pair = NPAIRS - 1;        dimm = (bdata & 0x0F) - 9; /*0x0A=dimmX1, 0x0B=dimmX2*/ -      n = sprintf(desc,"P%d_DIMM%c%d",cpu,rgpair[pair],dimm); +      if (dimm < 0)  +         n = sprintf(desc,"unknown DIMM");  /* was ver 0 */ +      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. */ diff --git a/util/subs.c b/util/subs.c index f2af5da..8965283 100644 --- a/util/subs.c +++ b/util/subs.c @@ -403,7 +403,7 @@ int get_errno(void)   /* For a list of all IANA enterprise mfg vendor numbers,     * see http://www.iana.org/assignments/enterprise-numbers     * Product numbers are different for each mfg vendor.  */ -#define N_MFG  46 +#define N_MFG  47  static struct { int val; char *pstr; } mfgs[N_MFG] = {      {0,   " "},      {0x0000BA, "Toshiba"}, @@ -450,6 +450,7 @@ static struct { int val; char *pstr; } mfgs[N_MFG] = {      {VENDOR_SUN,  "Sun"},     /*=0x00002A*/      {VENDOR_LENOVO, "Lenovo"},  /*=0x004A66*/      {VENDOR_LENOVO2, "Lenovo"}, /*=0x004F4D*/ +    {VENDOR_ASUS, "ASUS"},  /*=0x000A3F*/      {VENDOR_INTEL, "Intel"}   /*=0x000157*/  }; | 
