diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-04-29 15:49:15 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-04-29 15:49:15 +0200 |
commit | 2945f6199eb2652bd8092367ae456dc0e49fb76d (patch) | |
tree | d77c66c0e5206b9a9f3439c29de6c4c65d12e1a4 /util | |
parent | 563deb61bf7f474ef6aa89f2038457af54eed0c1 (diff) | |
parent | b18f5bf2db0fba2e7e539f68645836036d940d26 (diff) |
New upstream release 2.9.6
Diffstat (limited to 'util')
-rw-r--r-- | util/AnsiTerm.cpp | 15 | ||||
-rw-r--r-- | util/Makefile.am-so | 241 | ||||
-rw-r--r-- | util/Makefile.in | 336 | ||||
-rw-r--r-- | util/ialarms.c | 2 | ||||
-rw-r--r-- | util/icmd.c | 2 | ||||
-rw-r--r-- | util/iconfig.c | 2 | ||||
-rw-r--r-- | util/idcmi.c | 2 | ||||
-rw-r--r-- | util/ievents.c | 2 | ||||
-rw-r--r-- | util/ifirewall.c | 2 | ||||
-rw-r--r-- | util/ifru.c | 2 | ||||
-rw-r--r-- | util/ifruset.c | 2 | ||||
-rw-r--r-- | util/igetevent.c | 2 | ||||
-rw-r--r-- | util/ihealth.c | 3 | ||||
-rw-r--r-- | util/ilan.c | 19 | ||||
-rw-r--r-- | util/ipicmg.c | 2 | ||||
-rw-r--r-- | util/ipmicmd.c | 1 | ||||
-rw-r--r-- | util/ipmiutil.c | 2 | ||||
-rw-r--r-- | util/ipmiutil.mak | 15 | ||||
-rw-r--r-- | util/ipmiutil.mak.orig | 423 | ||||
-rw-r--r-- | util/ipmiutil2.mak | 3 | ||||
-rw-r--r-- | util/ipmiutil64.mak | 6 | ||||
-rw-r--r-- | util/ireset.c | 2 | ||||
-rw-r--r-- | util/isel.c | 2 | ||||
-rw-r--r-- | util/iseltime.c | 2 | ||||
-rw-r--r-- | util/isensor.c | 48 | ||||
-rw-r--r-- | util/iserial.c | 2 | ||||
-rw-r--r-- | util/isol.c | 2 | ||||
-rw-r--r-- | util/itsol.c | 2 | ||||
-rw-r--r-- | util/iwdt.c | 2 | ||||
-rw-r--r-- | util/oem_dell.c | 2 | ||||
-rw-r--r-- | util/oem_sun.c | 2 | ||||
-rw-r--r-- | util/oem_supermicro.c | 2 |
32 files changed, 731 insertions, 421 deletions
diff --git a/util/AnsiTerm.cpp b/util/AnsiTerm.cpp index be94465..750fd52 100644 --- a/util/AnsiTerm.cpp +++ b/util/AnsiTerm.cpp @@ -22,6 +22,8 @@ * 10/17/09 Robert Nelson * - Use GetProcAddress for (Get/Set)ConsoleScreenBufferInfoEx since they * are only available on Vista and beyond. + * 01/27/2015 Andy Cress + * - handle ProcessRM asserts * * Todo: * - Implement soft tabs @@ -1089,6 +1091,7 @@ CAnsiTerm::OutputText(void) if (WriteConsoleW(m_hConsole, &m_OutputBuffer[m_dwOutputCount - 1], 1, &dwWritten, NULL)) { + dbglog("OutputTest: WriteConsoleW error1\n"); assert(dwWritten == 1); } @@ -1102,6 +1105,7 @@ CAnsiTerm::OutputText(void) if (WriteConsoleW(m_hConsole, pwszCurrent, dwPartialCount, &dwWritten, NULL)) { + dbglog("OutputTest: WriteConsoleW error2\n"); assert(dwWritten == dwPartialCount); } else @@ -1530,6 +1534,8 @@ CAnsiTerm::ProcessRIS(void) bool CAnsiTerm::ProcessRM(void) { + bool bret = true; + if (m_bPrivateParameters) { for (int index = 0; index < m_ParameterCount; index++) @@ -1538,7 +1544,8 @@ CAnsiTerm::ProcessRM(void) { case 0: default: - assert(false); + dbglog("ProcessRM: illegal private param %d\n",m_Parameters[index]); + bret = false; break; case DECCKM: m_bCursorKeyMode = false; @@ -1584,11 +1591,13 @@ CAnsiTerm::ProcessRM(void) switch (m_Parameters[index]) { case 20: m_bLineFeedNewLineMode = false; break; // LNM - default: assert(false); break; + default: + dbglog("ProcessRM: illegal public param %d\n",m_Parameters[index]); + bret = false; break; } } } - return true; + return bret; } bool diff --git a/util/Makefile.am-so b/util/Makefile.am-so deleted file mode 100644 index 97d9c34..0000000 --- a/util/Makefile.am-so +++ /dev/null @@ -1,241 +0,0 @@ - -localedir = $(datadir)/locale -INCLUDES = -I. -I.. -OS_CF = @OS_CFLAGS@ @CROSS_CFLAGS@ -OS_LF = @OS_LFLAGS@ @CROSS_LFLAGS@ -AM_CPPFLAGS = $(OS_CF) -DLOCALEDIR=\"$(localedir)\" -AM_CPPFLAGS += @IA64_CFLAGS@ @GPL_CFLAGS@ -LDADD = $(OS_LF) -LDSAM = $(OS_LF) @LD_SAMX@ -CFLAGS_SAMX = -O2 -g -I. -I.. $(OS_CF) @LANPLUS_CFLAGS@ -CFLAGS_SAM = -O2 -g -I. -I.. $(OS_CF) -# May be /usr/bin/install or /bin/install -INSTALLBIN = install -c -extradir = $(datadir)/ipmiutil -inc_dir = $(includedir) -tmpobj = obj -tmpwin = tmp -LIBDIR = @LIB_DIR@ - -CMDSRC = ipmicmd.c mem_if.c ipmidir.c imbapi.c ipmimv.c ipmild.c ipmibmc.c ipmilipmi.c subs.c -CMDSRC += md5.c md2.c ipmilan.c -CMDSRC += ipmilanplus.c -# CMDSRC = ipmicmd.c mem_if.c @OS_DRIVERS@ -# am: configure substitutions are not allowed in _SOURCES variables -CMDOBJ = $(tmpobj)/ipmicmd.o $(tmpobj)/mem_if.o $(tmpobj)/ipmidir.o $(tmpobj)/imbapi.o $(tmpobj)/ipmimv.o $(tmpobj)/ipmild.o $(tmpobj)/ipmibmc.o $(tmpobj)/ipmilipmi.o $(tmpobj)/subs.o $(tmpobj)/md5.o $(tmpobj)/md2.o $(tmpobj)/ipmilan.o $(tmpobj)/ipmilanplus.o -LIBOBJ = $(CMDOBJ) -OEMMOD = oem_kontron.c oem_fujitsu.c oem_intel.c oem_sun.c iekanalyzer.c oem_supermicro.c oem_dell.c oem_quanta.c oem_hp.c oem_newisys.c - - -AM_CPPFLAGS += -I. -I.. -DMETACOMMAND -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) -LDADD += -lpthread - -# The LanDesk library is proprietary, so it is incompatible with ALLOW_GPL. -# To build with LanDesk support: -# First copy the library to ../lib/libipmiapi.a -# Then ./configure --enable-landesk -# Result: -# AM_CPPFLAGS += -DLINK_LANDESK -# LDADD += -lipmiapi -L../lib -AM_CPPFLAGS += @LANDESK_CFLAGS@ -LDADD += @LANDESK_LDADD@ - -# For lanplus plugin support (IPMI LAN 2.0 RMCP+) required by SOL: -# If ./configure --disable-lanplus -# AM_CPPFLAGS += -# LDADD += -# LANPLUS_SRC = -# Otherwise default result is lanplus enabled: -# AM_CPPFLAGS += -DHAVE_LANPLUS -# LDADD += -L../lib -lipmi_lanplus -L/usr/local/lib -lcrypto -# LDADD += -L../lib -lintf_lanplus -L/usr/local/lib -lcrypto (older) -# LANPLUS_SRC = $(LANPLUS_DIR)/lanplus.c ... -AM_CPPFLAGS += @LANPLUS_CFLAGS@ -I../lib/lanplus -I../lib/lanplus/inc -LDADD += @LANPLUS_LIB@ @LANPLUS_CRYPTO@ -LANPLUS_OBJ = $(shell ar t @LANPLUS_LIB@ 2>/dev/null) -LANPLUS_DIR = ../lib/lanplus -LANPLUS_SRC = $(LANPLUS_DIR)/lanplus.c $(LANPLUS_DIR)/lanplus_dump.c \ - $(LANPLUS_DIR)/lanplus_strings.c $(LANPLUS_DIR)/lanplus_crypt.c \ - $(LANPLUS_DIR)/lanplus_crypt_impl.c $(LANPLUS_DIR)/helper.c \ - $(LANPLUS_DIR)/ipmi_strings.c - -# sbin_PROGRAMS are built by default and copied to /usr/sbin at install time -# EXTRA_PROGRAMS are built by default but not included in the install package -# TESTPROGS are not built by default. To build, do 'make ifruset', for example. -bin_PROGRAMS = ipmiutil ievents idiscover -sbin_PROGRAMS = ipmi_port -DEV_LIB = libipmiutil.a -EXTRA_PROGRAMS = ipmi_sample ipmi_sample_evt -TESTPROGS = libimbapi.a iconfig ipmimv ifruset ipmi_sample2 ialarms_enc iseltime -# OLDPROGS are old/previous binaries that may exist and need to be deleted. -OLDPROGS = alarms bmchealth fruconfig getevent hwreset icmd isolconsole pefconfig sensor showsel tmconfig wdt - -lib_LTLIBRARIES = libipmiutil.la -libipmiutil_la_SOURCES = $(CMDSRC) $(LANPLUS_SRC) -libipmiutil_la_LDFLAGS = -export-dynamic - -# To build an imb api library (libimbapi.a): -libimbapi.a: imbapi.c - mkdir -p $(tmpobj) - $(CC) -I. -I.. $(OS_CF) -fPIC $(CFLAGS) -o $(tmpobj)/imbapi.o -c imbapi.c - $(AR) cru libimbapi.a $(tmpobj)/imbapi.o - $(RANLIB) libimbapi.a - rm -f $(tmpobj)/imbapi.o - -# Build a lib to support all of the IPMI drivers (libipmiutil.a) -# If LANPLUS_SAM = yes, include LANPLUS_OBJ, else do not. -# See configure --enable-liblanplus to change this -$(DEV_LIB): $(CMDOBJ) @LANPLUS_LIB@ - mkdir -p $(tmpobj) - if [ "x@LANPLUS_SAM@" = "xyes" ]; then \ - $(CC) $(CFLAGS_SAMX) -o $(tmpobj)/ipmilanplus.o -c ipmilanplus.c; \ - $(CC) $(CFLAGS_SAMX) -o $(tmpobj)/ipmilan.o -c ipmilan.c; \ - ar x @LANPLUS_LIB@ ; \ - $(AR) cru $(DEV_LIB) $(LIBOBJ) $(LANPLUS_OBJ); \ - $(RANLIB) $(DEV_LIB); \ - else \ - $(CC) $(CFLAGS_SAM) -o $(tmpobj)/ipmilanplus.o -c ipmilanplus.c; \ - $(CC) $(CFLAGS_SAM) -o $(tmpobj)/ipmilan.o -c ipmilan.c; \ - $(AR) cru $(DEV_LIB) $(LIBOBJ) ; \ - $(RANLIB) $(DEV_LIB) ; \ - fi - rm -f $(tmpobj)/ipmilan.o $(tmpobj)/ipmilanplus.o - -# To build ipmiutil, need to use METACFLAGS for each .c/.o - -idiscover: idiscover.c - $(CC) $(OS_CF) $(CFLAGS) $(LDFLAGS) $(OS_LF) -o idiscover idiscover.c - -ipmimv: ipmimv.c - $(CC) $(OS_CF) $(CFLAGS) $(LDFLAGS) -DTEST_BIN -o ipmimv ipmimv.c - -ievents: ievents.c - $(CC) $(OS_CF)$(CFLAGS) $(LDFLAGS) -DALONE -o ievents ievents.c - -ipmi_sample: $(DEV_LIB) ipmi_sample.c isensor.c ievents.c - $(CC) $(CFLAGS_SAM) -c ipmi_sample.c - $(CC) -g -O2 -o ipmi_sample ipmi_sample.o $(DEV_LIB) $(LDFLAGS) $(LDSAM) - -ialarms_enc: $(DEV_LIB) ialarms.c oem_intel.c - $(CC) $(CFLAGS_SAM) -DTEST_ENC -o ialarms2.o -c ialarms.c - $(CC) $(CFLAGS_SAM) -DNO_EVENTS -o oem_intel2.o -c oem_intel.c - $(CC) -g -O2 -o ialarms_enc ialarms2.o oem_intel2.o $(DEV_LIB) $(LDFLAGS) $(LDSAM) - -ifru_picmg2.o: ifru_picmg.c - $(CC) $(CFLAGS_SAM) -o ifru_picmg2.o -c ifru_picmg.c - -# To build ipmi_sample with GET_SENSORS enabled, need isensors.o, ievents.o -# Note that this does not include oem_intel, etc. for OEM SEL decoding. -ipmi_sample2: $(DEV_LIB) ipmi_sample.c isensor.c ievents.c ifru.c isel.c ifru_picmg2.o - $(CC) $(CFLAGS_SAM) -D GET_SENSORS -D GET_FRU -o ipmi_sample2.o -c ipmi_sample.c - $(CC) $(CFLAGS_SAM) -o isensor2.o -c isensor.c - $(CC) $(CFLAGS_SAM) -o ievents2.o -c ievents.c - $(CC) $(CFLAGS_SAM) -o ifru2.o -c ifru.c - $(CC) $(CFLAGS_SAM) -o isel2.o -c isel.c - $(CC) -g -O2 -o ipmi_sample2 ipmi_sample2.o isensor2.o ievents2.o ifru2.o ifru_picmg2.o isel2.o $(DEV_LIB) $(LDFLAGS) $(LDSAM) - -ipmi_sample_evt: $(DEV_LIB) ipmi_sample_evt.c isensor.c ievents.c - $(CC) $(CFLAGS_SAM) -o ipmi_sample_evt.o -c ipmi_sample_evt.c - $(CC) $(CFLAGS_SAM) -o isensor2.o -c isensor.c - $(CC) $(CFLAGS_SAM) -DSENSORS_OK -o ievents2.o -c ievents.c - $(CC) -g -O2 -o ipmi_sample_evt ipmi_sample_evt.o isensor2.o ievents2.o $(DEV_LIB) $(LDFLAGS) $(LDSAM) - -ifruset: $(DEV_LIB) ifruset.c ifru_picmg2.o - $(CC) $(CFLAGS_SAM) -c ifruset.c - $(CC) -g -O2 -o ifruset ifruset.o ifru_picmg2.o $(DEV_LIB) $(LDFLAGS) $(LDADD) - -iseltime: $(DEV_LIB) iseltime.c - $(CC) $(CFLAGS_SAM) -c iseltime.c - $(CC) -g -O2 -o iseltime iseltime.o $(DEV_LIB) $(LDFLAGS) $(LDADD) - -ipmi_port: ipmi_port.c - $(CC) $(CFLAGS) $(LDFLAGS) -o ipmi_port ipmi_port.c - -#xmlconfig: xmlconfig.c $(DEV_LIB) -# $(CC) $(CFLAGS) $(LDFLAGS) -o xmlconfig xmlconfig.c libipmiutil.a @LANPLUS_CRYPTO@ - -iconfig: iconfig.c $(DEV_LIB) - $(CC) $(CFLAGS) $(LDFLAGS) -o iconfig iconfig.c $(DEV_LIB) @LANPLUS_CRYPTO@ - -# @LANPLUS_LIB@ is ../lib/libipmi_lanplus.a -../lib/libipmi_lanplus.a: - cd ../lib; make - -ipmiutil_SOURCES = $(METASOURCE) - -ipmiutil: $(METASOURCE:.c=.o) $(CMDOBJ) @LANPLUS_LIB@ - $(CC) $(CFLAGS) $(LDFLAGS) -o ipmiutil $(METASOURCE:.c=.o) $(CMDOBJ) $(LDADD) - -$(tmpobj)/ipmicmd.o: ipmicmd.c - mkdir -p $(tmpobj) - @$(CC) $(CFLAGS_SAMX) -o $(tmpobj)/ipmicmd.o -c ipmicmd.c - -$(tmpobj)/subs.o: subs.c - @$(CC) $(CFLAGS_SAMX) -o $(tmpobj)/subs.o -c subs.c - -$(tmpobj)/mem_if.o: mem_if.c - @$(CC) $(CFLAGS_SAMX) -o $(tmpobj)/mem_if.o -c mem_if.c - -$(tmpobj)/ipmidir.o: ipmidir.c - @$(CC) $(CFLAGS_SAMX) -o $@ -c ipmidir.c - -$(tmpobj)/imbapi.o: imbapi.c - @$(CC) $(CFLAGS_SAMX) -o $@ -c imbapi.c - -$(tmpobj)/ipmimv.o: ipmimv.c - @$(CC) $(CFLAGS_SAMX) -o $@ -c ipmimv.c - -$(tmpobj)/ipmild.o: ipmild.c - @$(CC) $(CFLAGS_SAMX) -o $@ -c ipmild.c - -$(tmpobj)/ipmibmc.o: ipmibmc.c - @$(CC) $(CFLAGS_SAMX) -o $@ -c ipmibmc.c - -$(tmpobj)/ipmilipmi.o: ipmilipmi.c - @$(CC) $(CFLAGS_SAMX) -o $@ -c ipmilipmi.c - -$(tmpobj)/ipmilan.o: ipmilan.c - @$(CC) $(CFLAGS_SAMX) -o $@ -c ipmilan.c - -$(tmpobj)/ipmilanplus.o: ipmilanplus.c - @$(CC) $(CFLAGS_SAMX) -o $@ -c ipmilanplus.c - -$(tmpobj)/md5.o: md5.c - @$(CC) $(CFLAGS_SAMX) -o $@ -c md5.c - -$(tmpobj)/md2.o: md2.c - @$(CC) $(CFLAGS_SAMX) -o $@ -c md2.c - -#%.o: %.c -# $(CC) -c $(OS_CF) $(CFLAGS) $(AM_CPPFLAGS) -o $@ $< - -ievents_SOURCES = ievents.c - -idiscover_SOURCES = idiscover.c - -ipmi_port_SOURCES = ipmi_port.c - -# xmlconfig_SOURCES = xmlconfig.c $(CMDSRC) - -EXTRA_DIST = imb_api.h ipmicmd.h ipmidir.h ipmilan.h ipmilanplus.h AnsiTerm.h iekanalyzer.h ifirewall.h ifwum.h ihpm.h ipicmg.h ipmiutil.h md2.h oem_dell.h oem_fujitsu.h oem_intel.h oem_kontron.h oem_sun.h idcmi.h isensor.h - -all-am: Makefile $(DEV_LIB) $(bin_PROGRAMS) $(sbin_PROGRAMS) $(EXTRA_PROGRAMS) - -install-data-am: $(EXTRA_PROGRAMS) $(DEV_LIB) - @INS_LIB@ mkdir -p $(DESTDIR)$(extradir) - @INS_LIB@ mkdir -p $(DESTDIR)$(LIBDIR) - @INS_LIB@ mkdir -p $(DESTDIR)$(inc_dir) - @INS_LIB@ cp -f ipmi_sample.c $(DESTDIR)$(extradir) - @INS_LIB@ cp -f ipmi_sample_evt.c $(DESTDIR)$(extradir) - @INS_LIB@ cp -f ipmicmd.h $(DESTDIR)$(inc_dir) - @INS_LIB@ cp -f isensor.c ievents.c $(DESTDIR)$(extradir) - @INS_LIB@ cp -f isensor.h ievents.h $(DESTDIR)$(extradir) - @INS_LIB@ cp -f Makefile.sample $(DESTDIR)$(extradir)/Makefile - @INS_LIB@ cp -f $(DEV_LIB) $(DESTDIR)$(LIBDIR) - -clean-generic: - rm -f $(DEV_LIB) $(EXTRA_PROGRAMS) $(OLDPROGS) $(TESTPROGS) - if [ -d $(tmpobj) ]; then rm -rf $(tmpobj) ; fi - if [ -d $(tmpwin) ]; then rm -rf $(tmpwin) ; fi - rm -f *.log *.tmp debug*.list *.o *.pdb *.lo *.so *.la diff --git a/util/Makefile.in b/util/Makefile.in index 6d79806..466c530 100644 --- a/util/Makefile.in +++ b/util/Makefile.in @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,15 +15,12 @@ @SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -48,9 +46,8 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) $(sbin_PROGRAMS) am_idiscover_OBJECTS = idiscover.$(OBJEXT) idiscover_OBJECTS = $(am_idiscover_OBJECTS) @@ -99,17 +96,19 @@ iseltime_SOURCES = iseltime.c iseltime_OBJECTS = iseltime.$(OBJEXT) iseltime_LDADD = $(LDADD) iseltime_DEPENDENCIES = $(am__DEPENDENCIES_1) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles +am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ SOURCES = $(idiscover_SOURCES) $(ievents_SOURCES) $(ipmi_port_SOURCES) \ ipmi_sample.c ipmi_sample_evt.c $(ipmiutil_SOURCES) iseltime.c DIST_SOURCES = $(idiscover_SOURCES) $(ievents_SOURCES) \ @@ -119,8 +118,6 @@ ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ @@ -134,24 +131,22 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CROSS_CFLAGS = @CROSS_CFLAGS@ CROSS_LFLAGS = @CROSS_LFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ GPL_CFLAGS = @GPL_CFLAGS@ +GREP = @GREP@ IA64_CFLAGS = @IA64_CFLAGS@ INIT_DIR = @INIT_DIR@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -164,6 +159,7 @@ LANPLUS_CRYPTO = @LANPLUS_CRYPTO@ LANPLUS_LDADD = @LANPLUS_LDADD@ LANPLUS_LIB = @LANPLUS_LIB@ LANPLUS_SAM = @LANPLUS_SAM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_SAMX = @LD_SAMX@ LIBOBJS = @LIBOBJS@ @@ -171,13 +167,20 @@ LIBS = @LIBS@ LIBSENSORS = @LIBSENSORS@ LIBTOOL = @LIBTOOL@ LIB_DIR = @LIB_DIR@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_CFLAGS = @OS_CFLAGS@ OS_DRIVERS = @OS_DRIVERS@ OS_LFLAGS = @OS_LFLAGS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -196,18 +199,12 @@ STRIP = @STRIP@ SUBDIR_S = @SUBDIR_S@ SYSTEMD_DIR = @SYSTEMD_DIR@ VERSION = @VERSION@ -WITH_PKG_CONFIG_FALSE = @WITH_PKG_CONFIG_FALSE@ -WITH_PKG_CONFIG_TRUE = @WITH_PKG_CONFIG_TRUE@ -ac_ct_AR = @ac_ct_AR@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -219,30 +216,42 @@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = $(datadir)/locale localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -localedir = $(datadir)/locale +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ INCLUDES = -I.. OS_CF = @OS_CFLAGS@ @CROSS_CFLAGS@ OS_LF = @OS_LFLAGS@ @CROSS_LFLAGS@ @@ -308,14 +317,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign util/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign util/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign util/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign util/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -333,62 +342,93 @@ $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(sbindir)" || $(mkdir_p) "$(DESTDIR)$(sbindir)" - @list='$(sbin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(sbindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(sbindir)/$$f" || exit 1; \ - else :; fi; \ - done + test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ + } \ + ; done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) - @list='$(sbin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(sbindir)/$$f'"; \ - rm -f "$(DESTDIR)$(sbindir)/$$f"; \ - done + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(sbindir)" && rm -f $$files clean-sbinPROGRAMS: - @list='$(sbin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done + @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -448,22 +488,22 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subs.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< @@ -474,82 +514,85 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -distclean-libtool: - -rm -f libtool -uninstall-info-am: - ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -558,7 +601,7 @@ check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am @@ -578,6 +621,7 @@ mostlyclean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -591,7 +635,7 @@ distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ - distclean-libtool distclean-tags + distclean-tags dvi: dvi-am @@ -599,16 +643,36 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: +install-dvi: install-dvi-am + +install-dvi-am: + install-exec-am: install-binPROGRAMS install-sbinPROGRAMS +install-html: install-html-am + +install-html-am: + install-info: install-info-am +install-info-am: + install-man: +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -629,21 +693,24 @@ ps: ps-am ps-am: -uninstall-am: uninstall-binPROGRAMS uninstall-info-am \ - uninstall-sbinPROGRAMS +uninstall-am: uninstall-binPROGRAMS uninstall-sbinPROGRAMS + +.MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool clean-sbinPROGRAMS ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-sbinPROGRAMS install-strip \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-sbinPROGRAMS install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-info-am uninstall-sbinPROGRAMS + uninstall-sbinPROGRAMS # To build an imb api library (libimbapi.a): @@ -770,6 +837,7 @@ clean-generic: if [ -d $(tmpobj) ]; then rm -rf $(tmpobj) ; fi if [ -d $(tmpwin) ]; then rm -rf $(tmpwin) ; fi rm -f *.log *.tmp debug*.list *.o *.pdb *.lo *.la *.so + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/util/ialarms.c b/util/ialarms.c index 6554256..68f69b4 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 = "2.95"; +static char * progver = "2.96"; static char * progname = "ialarms"; static char fdebug = 0; static char fbmctam = 0; diff --git a/util/icmd.c b/util/icmd.c index 523248b..c12de8a 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 = "2.95"; +static char * progver = "2.96"; static char * progname = "icmd"; static char fdebug = 0; static char fquiet = 0; diff --git a/util/iconfig.c b/util/iconfig.c index 5fb8680..6bdb104 100644 --- a/util/iconfig.c +++ b/util/iconfig.c @@ -171,7 +171,7 @@ typedef struct /* * Global variables */ -static char * progver = "2.95"; +static char * progver = "2.96"; static char * progname = "iconfig"; static char fdebug = 0; static char fipmilan = 0; diff --git a/util/idcmi.c b/util/idcmi.c index bcd728f..9ab1c82 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 = "2.95"; +static char * progver = "2.96"; 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 098df46..f0034b2 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 = "2.95"; +static char *progver = "2.96"; static char *progname = "ievents"; static char fsensdesc = 0; /* 1= get extended sensor descriptions*/ static char fcanonical = 0; /* 1= show canonical, delimited output*/ diff --git a/util/ifirewall.c b/util/ifirewall.c index 9adfd24..f9da95d 100644 --- a/util/ifirewall.c +++ b/util/ifirewall.c @@ -64,7 +64,7 @@ /* global variables */ static char * progname = "ifirewall"; -static char * progver = "2.95"; +static char * progver = "2.96"; 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 af4d94b..5b5192f 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 = "2.95"; +static char *progver = "2.96"; 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 5939b56..472b71f 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 = "2.95"; +static char *progver = "2.96"; static char fdebug = 0; static char fpicmg = 0; static char fonlybase = 0; diff --git a/util/igetevent.c b/util/igetevent.c index fb3b4ab..96f5442 100644 --- a/util/igetevent.c +++ b/util/igetevent.c @@ -168,7 +168,7 @@ extern void free_sdr_cache(uchar *pret); /*see isensor.c*/ * Global variables */ static char * progname = "igetevent"; -static char * progver = "2.95"; +static char * progver = "2.96"; static char fdebug = 0; static char fipmilan = 0; static char frunonce = 0; diff --git a/util/ihealth.c b/util/ihealth.c index 986185f..5167950 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 = "2.95"; +static char * progver = "2.96"; static char fdebug = 0; static char fipmilan = 0; static char fcanonical = 0; @@ -723,6 +723,7 @@ void show_devid_all(int dtype, uchar *devrec, int sdevrec) case 1576: prodstr = "(X9DRi)"; break; case 1585: prodstr = "(X9SCA)"; break; case 1603: prodstr = "(X9SPU)"; break; /*0x0643*/ + case 1636: prodstr = "(X9DRH)"; break; /*0x0664*/ case 1643: prodstr = "(X9SRL)"; break; /*0x066b*/ case 1797: prodstr = "(X9DR7)"; break; /*0x0705*/ case 4520: prodstr = "(H8DGU)"; break; diff --git a/util/ilan.c b/util/ilan.c index 910b1fa..2458fbb 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 = "2.95"; +static char * progver = "2.96"; static char * progname = "ilan"; static char fdebug = 0; static char fipmilan = 0; @@ -362,6 +362,8 @@ static uchar osmyip[4] = {0,0,0,0}; static uchar bmcmyip[4] = {0,0,0,0}; static uchar bmcdestip[4] = {0,0,0,0}; static uchar bmcdestmac[6]= {0xff,0,0,0,0,0}; +static uchar bmcgwyip[4] = {0,0,0,0}; +static uchar bmcgwymac[6]= {0xff,0,0,0,0,0}; static uchar bmcmymac[6] = {0xff,0,0,0,0,0}; static uchar rgmymac[6] = {0xff,0,0,0,0,0}; static uchar osmymac[6] = {0xff,0,0,0,0,0}; @@ -4492,6 +4494,10 @@ main(int argc, char **argv) // if (pc[0] >= 30) memcpy(bparm7,pc,3); } else if (ival == 17) { /* num dest */ ndest = pc[0]; /* save the number of destinations */ + } else if (ival == 12) { /* gateway addr */ + if (IpIsValid(pc)) memcpy(bmcgwyip,pc,4); + } else if (ival == 13) { /* gateway mac */ + if (MacIsValid(pc)) memcpy(bmcgwymac,pc,MAC_LEN); } else if (ival == 19) { /* dest addr */ if (IpIsValid(&pc[3])) memcpy(bmcdestip,&pc[3],4); if (MacIsValid(&pc[7])) memcpy(bmcdestmac,&pc[7],MAC_LEN); @@ -4964,8 +4970,12 @@ main(int argc, char **argv) rggwyip[0], rggwyip[1], rggwyip[2], rggwyip[3], rggwymac[0], rggwymac[1], rggwymac[2], rggwymac[3], rggwymac[4], rggwymac[5]); - if (!SubnetIsSame(rgmyip,rggwyip,rgsubnet)) - printf("WARNING: IP Address and Gateway are not on the same subnet.\n"); + if (!SubnetIsSame(rgmyip,rggwyip,rgsubnet)) { + printf("WARNING: IP Address and Gateway are not on the same subnet," + " setting Gateway to previous value\n"); + memcpy(rggwyip,bmcgwyip,4); + memcpy(rggwymac,bmcgwymac,6); + } /* Set the Default Gateway IP & MAC */ memcpy(&LanRecord,rggwyip,4); @@ -4977,13 +4987,14 @@ main(int argc, char **argv) printf(" Warning: Gateway MAC address was not resolved! " "Check %s interface, use -i ethN, or use -H gwymac.\n", ifname); + memcpy(&LanRecord,bmcgwymac,6); } else { memcpy(&LanRecord,rggwymac,6); + } ret = SetLanEntry(13, &LanRecord, 6); printf("SetLanEntry(13), ret = %d\n",ret); if (ret != 0) { nerrs++; lasterr = ret; } else ngood++; - } } if (IpIsValid(rggwy2ip)) { if (!MacIsValid(rggwy2mac)) /* if gwy2 MAC not set by user */ diff --git a/util/ipicmg.c b/util/ipicmg.c index 15613f6..634fb16 100644 --- a/util/ipicmg.c +++ b/util/ipicmg.c @@ -81,7 +81,7 @@ /* Global data */ static char * progname = "ipicmg"; -static char * progver = "2.95"; +static char * progver = "2.96"; static char fdebug = 0; static char fset_mc = 0; static uint8_t g_bus = PUBLIC_BUS; diff --git a/util/ipmicmd.c b/util/ipmicmd.c index 9d56630..858d062 100644 --- a/util/ipmicmd.c +++ b/util/ipmicmd.c @@ -1339,7 +1339,6 @@ void parse_lan_options(int c, char *popt, char fdebugcmd) return; #else int i; - size_t len; static int fset_dtype = 0; uchar sa; char *p = NULL; diff --git a/util/ipmiutil.c b/util/ipmiutil.c index d51e469..05c13db 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 = "2.95"; +static char *progver = "2.96"; // static char fdebug = 0; /*int ipmiutil(int argc, char **argv); */ diff --git a/util/ipmiutil.mak b/util/ipmiutil.mak index 00d5b71..40daaf8 100644 --- a/util/ipmiutil.mak +++ b/util/ipmiutil.mak @@ -1,4 +1,4 @@ -# This makefile will build the ipmiutil util directory
+# This makefile will build the ipmiutil util directory (x32)
#
# First download getopt.c getopt.h
# Then download and build openssl for Windows
@@ -62,7 +62,7 @@ LIBS_EX = advapi32.lib kernel32.lib wsock32.lib $(LIBS_W) $(LIBC_RT) LIBS_PEF = /LIBPATH:$(LIB_D) iphlpapi.lib
# LIBS_EX+=wsock32.lib user32.lib gdi32.lib
-HEADER=ipmicmd.h imb_api.h ipmilan.h ipmidir.h ipmi_ioctls.h ipmilanplus.h \
+HEADER=ipmicmd.h imb_api.h ipmilan.h ipmidir.h ipmilanplus.h \
ipmiutil.h
SHOWSEL = showsel
@@ -118,13 +118,15 @@ clean: $(RM) *.obj 2>NUL
$(RM) $(TARG_EXE) 2>NUL
$(RM) *.exe 2>NUL
- $(RM) $(TMP_D)\*.obj 2>NUL
+ -$(RM) $(TMP_D)\*.obj 2>NUL
+ -$(RM) *.manifest 2>NUL
distclean:
$(RM) *.obj 2>NUL
$(RM) $(TARG_EXE) 2>NUL
$(RM) *.exe 2>NUL
- $(RM) $(TMP_D)\*.* 2>NUL
+ -$(RM) $(TMP_D)\*.* 2>NUL
+ -$(RM) *.manifest 2>NUL
rmdir $(TMP_D) 2>NUL
$(RM) *.rc 2>NUL
$(RM) *.bin 2>NUL
@@ -385,8 +387,9 @@ $(TMP_D)\iwdt.obj: iwdt.c $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\iwdt.obj iwdt.c
$(E_EXE): $(E_OBJ)
- $(LINK) $(LFLAGS) /OUT:$(E_EXE) $(E_OBJ) $(LF_LANPLUS) $(LIBS_PEF) $(LIBS_EX)
- mt.exe -manifest $(E_EXE).manifest -outputresource:$(E_EXE);1
+ $(LINK) $(LFLAGS) /OUT:$(E_EXE) $(E_OBJ) $(LF_LANPLUS) $(LIBS_PEF) $(LIBS_EX)
+
+# mt.exe -manifest $(E_EXE).manifest -outputresource:$(E_EXE);1
ipmi_sample.obj: ipmi_sample.c
$(CC) /c $(CFLAGS_SAM) ipmi_sample.c
diff --git a/util/ipmiutil.mak.orig b/util/ipmiutil.mak.orig new file mode 100644 index 0000000..f98cd66 --- /dev/null +++ b/util/ipmiutil.mak.orig @@ -0,0 +1,423 @@ +# This makefile will build the ipmiutil util directory
+#
+# First download getopt.c getopt.h
+# Then download and build openssl for Windows
+#
+LIBC_RT=libcmt.lib /NODEFAULTLIB:"msvcirt.lib"
+# LIBC_RT=msvcrt.lib /NODEFAULTLIB:"msvcirt.lib"
+
+MARCH=X64
+#MARCH=IX86
+# The ipmiutil directory
+SRC_D=.
+LIB_D=..\lib
+L2_D=$(LIB_D)\lanplus
+L3_D=$(LIB_D)\lanplus\inc
+INSTALLTOP=install
+TMP_D=tmp
+INC=/I$(SRC_D) /I$(L2_D) /I$(L3_D)
+CMD_OBJ = getopt.obj ipmicmd.obj imbapi.obj md5.obj md2.obj \
+ ipmilan.obj ipmims.obj subs.obj
+CMD_OBJ = $(CMD_OBJ) ipmilanplus.obj
+# To remove lanplus support use the empty LANPLUS variables
+# L2_OBJ=
+# LF_LANPLUS=
+# CF_LANPLUS=
+L2_OBJ = $(L2_D)\helper.obj $(L2_D)\ipmi_strings.obj $(L2_D)\lanplus.obj \
+ $(L2_D)\lanplus_crypt_impl.obj $(L2_D)\lanplus_dump.obj \
+ $(L2_D)\lanplus_strings.obj $(L2_D)\lanplus_crypt.obj
+LF_LANPLUS=/LIBPATH:$(LIB_D) $(L2_OBJ) ssleay32.lib libeay32.lib
+CF_LANPLUS=/D HAVE_LANPLUS
+
+# Set your compiler options
+# To remove any GPL dependencies, use the CF_EX line with NON_GPL
+# CFLAGS_O=/W3 /O2 /Zi /MD /GF /Gy /nologo
+# CFLAGS_O=/W3 /O2 /Zi /MD /nologo
+# CFLAGS_O=/W3 /O2 /Zi /MT /nologo
+CFLAGS_O=/W3 /O2 /Zi /MT /nologo
+CF_EX=/DWIN32 $(CF_LANPLUS) $(INC) /D_CONSOLE /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DHAVE_STRING_H
+CF_SAM=/DWIN32 $(INC) /D_CONSOLE /D_CRT_SECURE_NO_DEPRECATE /DHAVE_STRING_H
+CFLAGS=$(CFLAGS_O) $(CF_EX) /DSKIP_MD2
+CFLAGS_M=$(CFLAGS_O) $(CF_EX) /DSKIP_MD2 /DMETACOMMAND
+CFLAGS_SAM=$(CFLAGS_O) $(CF_SAM)
+LFLAGS=/nologo /subsystem:console /machine:$(MARCH) /opt:ref
+#LFLAGS=/nologo /subsystem:console /machine:IX86 /opt:ref
+#LFLAGS=/nologo /subsystem:console /machine:IX86 /opt:ref /debug
+# LFLAGS_D=/nologo /subsystem:console /machine:I386 /opt:ref /dll
+
+# CFLAGS_W=/O2 /D_CONSOLE /D_MBCS /EHsc /ML /W3 /Zi /TP
+CFLAGS_W=/TP /EHsc $(CFLAGS)
+LFLAGS_W=/nologo /subsystem:console /machine:$(MARCH) /opt:ref
+LIBS_W=comsuppw.lib wbemuuid.lib
+# gdi32.lib comdlg32.lib shell32.lib uuid.lib
+
+CC=cl
+LINK=link
+MKDIR=-mkdir
+MKLIB=lib
+RM=del
+CP=copy
+
+LIBS_EX = advapi32.lib kernel32.lib wsock32.lib $(LIBS_W) $(LIBC_RT)
+LIBS_PEF = /LIBPATH:$(LIB_D) iphlpapi.lib
+# LIBS_EX+=wsock32.lib user32.lib gdi32.lib
+
+HEADER=ipmicmd.h imb_api.h ipmilan.h ipmidir.h ipmi_ioctls.h ipmilanplus.h \
+ ipmiutil.h
+
+SHOWSEL = showsel
+TARG_EXE=ievents.exe $(SHOWSEL)msg.dll ipmi_sample.exe ipmi_sample_evt.exe $(SAMP_DLL)
+# alarms.exe ihealth.exe $(SHOWSEL).exe $(SHOWSEL)msg.dll \
+# ireset.exe ifru.exe ilan.exe iserial.exe wdt.exe \
+# getevent.exe sensor.exe icmd.exe isolconsole.exe idiscover.exe \
+# ievents.exe
+SAMP_LIB = ipmiutil.lib
+SAMP_DLL = ipmiutillib.dll
+
+E_EXE=ipmiutil.exe
+E_OBJ=$(TMP_D)\ipmiutil.obj \
+ $(TMP_D)\ialarms.obj $(TMP_D)\ihealth.obj $(TMP_D)\iwdt.obj \
+ $(TMP_D)\ireset.obj $(TMP_D)\ifru.obj $(TMP_D)\ilan.obj \
+ $(TMP_D)\iserial.obj $(TMP_D)\icmd.obj $(TMP_D)\isol.obj \
+ $(TMP_D)\isolwin.obj $(TMP_D)\AnsiTerm.obj $(TMP_D)\idiscover.obj \
+ $(TMP_D)\iconfig.obj $(TMP_D)\igetevent.obj $(TMP_D)\isensor.obj \
+ $(TMP_D)\isel.obj $(TMP_D)\ievents.obj \
+ $(TMP_D)\ipicmg.obj $(TMP_D)\ifirewall.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_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
+
+###################################################################
+all: banner $(TMP_D) exe
+
+banner:
+ @echo Building ipmiutil
+
+$(TMP_D):
+ $(MKDIR) $(TMP_D)
+ @echo created $(TMP_D)
+
+lib: $(L2_OBJ)
+ cd $(LIB_D)
+ nmake /nologo -f ipmilib.mak
+ cd ../util
+
+exe: $(E_EXE) $(TARG_EXE)
+
+install:
+ $(MKDIR) $(INSTALLTOP)
+ $(MKDIR) $(INSTALLTOP)\bin
+ $(CP) $(E_EXE) $(INSTALLTOP)\bin
+ xcopy $(TARG_EXE) $(INSTALLTOP)\bin
+ xcopy *.dll $(INSTALLTOP)\bin
+
+clean:
+ $(RM) *.obj 2>NUL
+ $(RM) $(TARG_EXE) 2>NUL
+ $(RM) *.exe 2>NUL
+ $(RM) $(TMP_D)\*.obj 2>NUL
+
+distclean:
+ $(RM) *.obj 2>NUL
+ $(RM) $(TARG_EXE) 2>NUL
+ $(RM) *.exe 2>NUL
+ $(RM) $(TMP_D)\*.* 2>NUL
+ rmdir $(TMP_D) 2>NUL
+ $(RM) *.rc 2>NUL
+ $(RM) *.bin 2>NUL
+ $(RM) *.RES 2>NUL
+ $(RM) getopt.* 2>NUL
+
+getopt.obj: getopt.c
+ $(CC) /c $(CFLAGS) getopt.c
+
+imbapi.obj: imbapi.c
+ $(CC) /c $(CFLAGS_M) imbapi.c
+
+ipmicmd.obj: ipmicmd.c
+ $(CC) /c $(CFLAGS) ipmicmd.c
+
+ipmilan.obj: ipmilan.c
+ $(CC) /c $(CFLAGS) ipmilan.c
+
+ipmilanplus.obj: ipmilanplus.c
+ $(CC) /c $(CFLAGS_M) ipmilanplus.c
+
+md5.obj: md5.c
+ $(CC) /c $(CFLAGS) md5.c
+
+md2.obj: md2.c
+ $(CC) /c $(CFLAGS) md2.c
+
+ievents.obj: ievents.c
+ $(CC) /c $(CFLAGS) ievents.c
+
+ialarms.obj: ialarms.c
+ $(CC) /c $(CFLAGS) ialarms.c
+
+ihealth.obj: ihealth.c
+ $(CC) /c $(CFLAGS) ihealth.c
+
+igetevent.obj: igetevent.c
+ $(CC) /c $(CFLAGS) igetevent.c
+
+mem_if.obj: mem_if.c
+ $(CC) /c $(CFLAGS_W) mem_if.c
+
+ipmims.obj: ipmims.cpp
+ $(CC) /c $(CFLAGS_W) ipmims.cpp
+
+isel.obj: isel.c
+ $(CC) /c $(CFLAGS) isel.c
+
+ireset.obj: ireset.c
+ $(CC) /c $(CFLAGS) ireset.c
+
+ireset.exe: ireset.obj $(CMD_OBJ)
+ $(LINK) $(LFLAGS) /OUT:ireset.exe ireset.obj $(CMD_OBJ) \
+ $(LF_LANPLUS) $(LIBS_EX)
+
+ifru.obj: ifru.c
+ $(CC) /c $(CFLAGS) ifru.c
+
+ifru.exe: ifru.obj mem_if.obj $(CMD_OBJ)
+ $(LINK) $(LFLAGS) /OUT:ifru.exe ifru.obj mem_if.obj $(CMD_OBJ) \
+ $(LF_LANPLUS) $(LIBS_EX)
+
+ilan.obj: ilan.c
+ $(CC) /c $(CFLAGS) ilan.c
+
+ilan.exe: ilan.obj $(CMD_OBJ)
+ $(LINK) $(LFLAGS) /OUT:ilan.exe ilan.obj $(CMD_OBJ) \
+ $(LF_LANPLUS) $(LIBS_PEF) $(LIBS_EX)
+
+iserial.obj: iserial.c
+ $(CC) /c $(CFLAGS) iserial.c
+
+iserial.exe: iserial.obj $(CMD_OBJ)
+ $(LINK) $(LFLAGS) /OUT:iserial.exe iserial.obj $(CMD_OBJ) \
+ $(LF_LANPLUS) $(LIBS_EX)
+
+isensor.obj: isensor.c
+ $(CC) /c $(CFLAGS) isensor.c
+
+isensor.exe: isensor.obj $(CMD_OBJ)
+ $(LINK) $(LFLAGS) /OUT:isensor.exe isensor.obj $(CMD_OBJ) \
+ $(LF_LANPLUS) $(LIBS_EX)
+
+iwdt.obj: iwdt.c
+ $(CC) /c $(CFLAGS) iwdt.c
+
+iwdt.exe: iwdt.obj $(CMD_OBJ)
+ $(LINK) $(LFLAGS) /OUT:iwdt.exe iwdt.obj $(CMD_OBJ) \
+ $(LF_LANPLUS) $(LIBS_EX)
+
+isol.obj: isol.c
+ $(CC) /c $(CFLAGS) isol.c
+
+isolwin.obj: isolwin.c
+ $(CC) /c $(CFLAGS) isolwin.c
+
+isol.exe: isol.obj isolwin.obj $(CMD_OBJ)
+ $(LINK) $(LFLAGS) /OUT:isol.exe isol.obj isolwin.obj \
+ $(CMD_OBJ) $(LF_LANPLUS) $(LIBS_EX)
+
+icmd.obj: icmd.c
+ $(CC) /c $(CFLAGS) icmd.c
+
+icmd.exe: icmd.obj $(CMD_OBJ)
+ $(LINK) $(LFLAGS) /OUT:icmd.exe icmd.obj $(CMD_OBJ) \
+ $(LF_LANPLUS) $(LIBS_EX)
+
+idiscover.obj: idiscover.c
+ $(CC) /c $(CFLAGS) idiscover.c
+
+idiscover.exe: idiscover.obj getopt.obj
+ $(LINK) $(LFLAGS) /OUT:idiscover.exe idiscover.obj getopt.obj \
+ $(LF_LANPLUS) $(LIBS_EX)
+
+ialarms.exe: ialarms.obj $(CMD_OBJ)
+ $(LINK) $(LFLAGS) /OUT:ialarms.exe ialarms.obj $(CMD_OBJ) \
+ $(LF_LANPLUS) $(LIBS_EX)
+
+ihealth.exe: ihealth.obj mem_if.obj $(CMD_OBJ)
+ $(LINK) $(LFLAGS) /OUT:ihealth.exe ihealth.obj mem_if.obj $(CMD_OBJ) \
+ $(LF_LANPLUS) $(LIBS_EX)
+
+igetevent.exe: igetevent.obj ievents.obj $(CMD_OBJ)
+ $(LINK) $(LFLAGS) /OUT:igetevent.exe igetevent.obj ievents.obj \
+ $(CMD_OBJ) $(LF_LANPLUS) $(LIBS_EX)
+
+isel.exe: isel.obj ievents.obj $(CMD_OBJ)
+ $(LINK) $(LFLAGS) /OUT:isel.exe isel.obj ievents.obj \
+ $(CMD_OBJ) $(LF_LANPLUS) $(LIBS_EX)
+
+$(SHOWSEL).mc:
+ $(CP) ..\scripts\$(SHOWSEL).mc .
+
+$(SHOWSEL)msg.dll: $(SHOWSEL).mc
+ mc -U $(SHOWSEL).mc
+ rc -r $(SHOWSEL).rc
+ $(LINK) /machine:$(MARCH) -dll -noentry -out:$(SHOWSEL)msg.dll $(SHOWSEL).res
+
+mem_if.exe: $(TMP_D)\mem_if.obj
+ $(LINK) $(LFLAGS_W) /OUT:mem_if.exe $(TMP_D)\mem_if.obj $(LIBS_EX)
+
+$(TMP_D)\mem_if.obj: mem_if.c
+ $(CC) /c $(CFLAGS_W) /DCOMP_BIN /Fo$(TMP_D)\mem_if.obj mem_if.c
+
+ievents.exe: ievents.c
+ $(CC) /c $(CFLAGS) /DALONE ievents.c
+ $(LINK) $(LFLAGS) /OUT:ievents.exe ievents.obj $(LIBS_EX)
+ $(RM) ievents.obj
+
+ipmims.exe: ipmims.cpp
+ $(CC) /c $(CFLAGS_W) /DALONE /DTEST_BIN ipmims.cpp
+ $(LINK) $(LFLAGS_W) /OUT:ipmims.exe ipmims.obj $(LIBS_EX)
+ $(RM) ipmims.obj
+
+$(TMP_D)\ievents.obj: ievents.c
+ $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\ievents.obj ievents.c
+
+$(TMP_D)\ipmiutil.obj: ipmiutil.c
+ $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\ipmiutil.obj ipmiutil.c
+
+$(TMP_D)\ialarms.obj: ialarms.c
+ $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\ialarms.obj ialarms.c
+
+$(TMP_D)\ihealth.obj: ihealth.c
+ $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\ihealth.obj ihealth.c
+
+$(TMP_D)\iconfig.obj: iconfig.c
+ $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\iconfig.obj iconfig.c
+
+$(TMP_D)\ipicmg.obj: ipicmg.c
+ $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\ipicmg.obj ipicmg.c
+
+$(TMP_D)\ifirewall.obj: ifirewall.c
+ $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\ifirewall.obj ifirewall.c
+
+$(TMP_D)\ifwum.obj: ifwum.c
+ $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\ifwum.obj ifwum.c
+
+$(TMP_D)\ihpm.obj: ihpm.c
+ $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\ihpm.obj ihpm.c
+
+$(TMP_D)\idcmi.obj: idcmi.c
+ $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\idcmi.obj idcmi.c
+
+$(TMP_D)\oem_fujitsu.obj: oem_fujitsu.c
+ $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\oem_fujitsu.obj oem_fujitsu.c
+
+$(TMP_D)\oem_kontron.obj: oem_kontron.c
+ $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\oem_kontron.obj oem_kontron.c
+
+$(TMP_D)\oem_intel.obj: oem_intel.c
+ $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\oem_intel.obj oem_intel.c
+
+$(TMP_D)\oem_sun.obj: oem_sun.c
+ $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\oem_sun.obj oem_sun.c
+
+$(TMP_D)\oem_dell.obj: oem_dell.c
+ $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\oem_dell.obj oem_dell.c
+
+$(TMP_D)\oem_hp.obj: oem_hp.c
+ $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\oem_hp.obj oem_hp.c
+
+$(TMP_D)\oem_supermicro.obj: oem_supermicro.c
+ $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\oem_supermicro.obj oem_supermicro.c
+
+$(TMP_D)\oem_quanta.obj: oem_quanta.c
+ $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\oem_quanta.obj oem_quanta.c
+
+$(TMP_D)\oem_newisys.obj: oem_newisys.c
+ $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\oem_newisys.obj oem_newisys.c
+
+$(TMP_D)\iekanalyzer.obj: iekanalyzer.c
+ $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\iekanalyzer.obj iekanalyzer.c
+
+$(TMP_D)\ifru_picmg.obj: ifru_picmg.c
+ $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\ifru_picmg.obj ifru_picmg.c
+
+$(TMP_D)\ifru.obj: ifru.c
+ $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\ifru.obj ifru.c
+
+$(TMP_D)\ireset.obj: ireset.c
+ $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\ireset.obj ireset.c
+
+$(TMP_D)\ilan.obj: ilan.c
+ $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\ilan.obj ilan.c
+
+$(TMP_D)\iserial.obj: iserial.c
+ $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\iserial.obj iserial.c
+
+$(TMP_D)\isensor.obj: isensor.c
+ $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\isensor.obj isensor.c
+
+$(TMP_D)\icmd.obj: icmd.c
+ $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\icmd.obj icmd.c
+
+$(TMP_D)\igetevent.obj: igetevent.c
+ $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\igetevent.obj igetevent.c
+
+$(TMP_D)\isel.obj: isel.c
+ $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\isel.obj isel.c
+
+$(TMP_D)\isol.obj: isol.c
+ $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\isol.obj isol.c
+
+$(TMP_D)\isolwin.obj: isolwin.c
+ $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\isolwin.obj isolwin.c
+
+$(TMP_D)\itsol.obj: itsol.c
+ $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\itsol.obj itsol.c
+
+$(TMP_D)\AnsiTerm.obj: AnsiTerm.cpp
+ $(CC) /c $(CFLAGS_W) /Fo$(TMP_D)\AnsiTerm.obj AnsiTerm.cpp
+
+$(TMP_D)\idiscover.obj: idiscover.c
+ $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\idiscover.obj idiscover.c
+
+$(TMP_D)\iwdt.obj: iwdt.c
+ $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\iwdt.obj iwdt.c
+
+$(E_EXE): $(E_OBJ)
+ $(LINK) $(LFLAGS) /OUT:$(E_EXE) $(E_OBJ) $(LF_LANPLUS) $(LIBS_PEF) $(LIBS_EX)
+
+ipmi_sample.obj: ipmi_sample.c
+ $(CC) /c $(CFLAGS_SAM) ipmi_sample.c
+
+$(SAMP_LIB): $(CMD_OBJ) mem_if.obj
+ $(CC) /c $(CFLAGS_SAM) ipmilanplus.c
+ $(MKLIB) /OUT:$(SAMP_LIB) /nologo $(CMD_OBJ) mem_if.obj
+ del ipmilanplus.obj
+
+$(SAMP_DLL): $(CMD_OBJ) mem_if.obj
+ $(CC) /D_WINDLL /D_USRDLL /c $(CFLAGS_SAM) ipmilanplus.c
+ $(LINK) /DLL $(LFLAGS) /OUT:$(SAMP_DLL) /def:ipmiutillib.def $(CMD_OBJ) mem_if.obj $(LIBS_PEF) $(LIBS_EX)
+ del ipmilanplus.obj
+
+ipmi_sample.exe: $(SAMP_LIB) ipmi_sample.obj
+ $(LINK) $(LFLAGS) /OUT:ipmi_sample.exe ipmi_sample.obj $(SAMP_LIB) $(LIBS_PEF) $(LIBS_EX)
+
+ipmi_sample2.exe: $(SAMP_LIB) ipmi_sample.c isensor.c ievents.c
+ $(CC) /c $(CFLAGS_SAM) /DGET_SENSORS ipmi_sample.c
+ $(CC) /c $(CFLAGS_SAM) isensor.c
+ $(CC) /c $(CFLAGS_SAM) ievents.c
+ $(LINK) $(LFLAGS) /OUT:ipmi_sample2.exe ipmi_sample.obj isensor.obj ievents.obj $(SAMP_LIB) $(LIBS_PEF) $(LIBS_EX)
+ del isensor.obj ievents.obj
+
+ipmi_sample_evt.obj: ipmi_sample_evt.c $(HEADER)
+ $(CC) /c $(CFLAGS_SAM) ipmi_sample_evt.c
+
+isensor2.obj: isensor.c isensor.h $(HEADER)
+ $(CC) /c /Foisensor2.obj $(CFLAGS_SAM) isensor.c
+
+ievents2.obj: ievents.c ievents.h $(HEADER)
+ $(CC) /c /Foievents2.obj $(CFLAGS_SAM) /DSENSORS_OK ievents.c
+
+ipmi_sample_evt.exe: $(SAMP_LIB) ipmi_sample_evt.obj ievents2.obj isensor2.obj
+ $(LINK) $(LFLAGS) /OUT:ipmi_sample_evt.exe ipmi_sample_evt.obj ievents2.obj isensor2.obj $(SAMP_LIB) $(LIBS_PEF) $(LIBS_EX)
diff --git a/util/ipmiutil2.mak b/util/ipmiutil2.mak index 8ed0155..8d41f50 100644 --- a/util/ipmiutil2.mak +++ b/util/ipmiutil2.mak @@ -120,7 +120,8 @@ clean: $(RM) *.obj 2>NUL
$(RM) $(TARG_EXE) 2>NUL
$(RM) *.exe 2>NUL
- $(RM) $(TMP_D)\*.obj 2>NUL
+ -$(RM) $(TMP_D)\*.obj 2>NUL
+ -$(RM) *.manifest 2>NUL
distclean:
$(RM) *.obj 2>NUL
diff --git a/util/ipmiutil64.mak b/util/ipmiutil64.mak index 4c7b315..fa6b88e 100644 --- a/util/ipmiutil64.mak +++ b/util/ipmiutil64.mak @@ -410,6 +410,12 @@ ipmi_sample2.exe: $(SAMP_LIB) ipmi_sample.c isensor.c ievents.c $(LINK) $(LFLAGS) /OUT:ipmi_sample2.exe ipmi_sample.obj isensor.obj ievents.obj $(SAMP_LIB) $(LIBS_PEF) $(LIBS_EX)
del isensor.obj ievents.obj
+ifruset.obj: ifruset.c
+ $(CC) /c $(CFLAGS_SAM) ifruset.c
+
+ifruset.exe: $(SAMP_LIB) ifruset.obj ifru_picmg.obj
+ $(LINK) $(LFLAGS) /OUT:ifruset.exe ifruset.obj ifru_picmg.obj $(SAMP_LIB) $(LIBS_PEF) $(LIBS_EX)
+
ipmi_sample_evt.obj: ipmi_sample_evt.c $(HEADER)
$(CC) /c $(CFLAGS_SAM) ipmi_sample_evt.c
diff --git a/util/ireset.c b/util/ireset.c index 3ca5312..0bfdeb0 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 = "2.95"; +static char * progver = "2.96"; static char * progname = "ireset"; static uchar ipmi_maj; static uchar ipmi_min; diff --git a/util/isel.c b/util/isel.c index 21fb932..723ae48 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 = "2.95"; +static char *progver = "2.96"; #ifdef WIN32 #define IDXFILE "sel.idx" static char idxfile[80] = IDXFILE; diff --git a/util/iseltime.c b/util/iseltime.c index 28ec5cc..0d82c90 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 = "2.95"; +static char * progver = "2.96"; static char * progname = "iseltime"; static char fdebug = 0; static char fset = 0; diff --git a/util/isensor.c b/util/isensor.c index 6ce290d..e5a80e0 100644 --- a/util/isensor.c +++ b/util/isensor.c @@ -247,7 +247,7 @@ char *decode_entity_id(int id) { * Global Data ************************/ static char *progname = "isensor"; -static char *progver = "2.95"; +static char *progver = "2.96"; #ifdef WIN32 static char savefile[] = "%ipmiutildir%\\thresholds.cmd"; #else @@ -1354,6 +1354,9 @@ int get_sdr_file(char *sdrfile, uchar **sdrlist) num = 0; while (fgets(buff, 255, fp)) { num++; } if (fdebug) printf("Reading %d SDRs from file %s\n",num,sdrfile); + if ((psdrcache != NULL) && (nsdrs > 0)) { /*already have sdrcache*/ + printf("get_sdr_file: Already have cache\n"); /*++++*/ + } sdrbuf = malloc(num * SDR_SZ); if (sdrbuf == NULL) { fclose(fp); @@ -1402,8 +1405,10 @@ int get_sdr_cache(uchar **pret) if ((psdrcache != NULL) && (nsdrs > 0)) { /*already have sdrcache*/ *pret = psdrcache; if (fdebug) printf("get_sdr_cache: already have cache (%p)\n",*pret); + printf("get_sdr_cache: Already have cache\n"); /*++++*/ return(0); } + else printf("get_sdr_cache: Allocating cache\n"); /*++++*/ rv = GetSDRRepositoryInfo(&n,&fdevsdrs); if (rv != 0) return(rv); @@ -1434,6 +1439,12 @@ int get_sdr_cache(uchar **pret) if (rv == 0xC5) { set_reserve(1); i--; } /*retry*/ else break; } else { /*success*/ + /* if sdrlen!=len, adjust */ + if ((len > 5) && (len != (psdr[4] + 5)) ) { + if (fdebug) printf("SDR[%x] adjust len from %d to %d\n", + recid,psdr[4]+5,len); + psdr[4] = len - 5; + } asz += len; if (recnext == recid) recid = 0xffff; else recid = recnext; @@ -1451,19 +1462,23 @@ int get_sdr_cache(uchar **pret) int find_nsdrs(uchar *pcache) { int num = 0; - int asz = 0; + ulong asz = 0; int i, len; uchar *sdr; ushort recid; if (pcache == NULL) return(num); - for (i = 0; asz < sz_sdrs; i++) + for (i = 0; (int)asz < sz_sdrs; i++) { sdr = &pcache[asz]; + if (sdr[2] != 0x51) { /* Dell SDR length error */ + printf("SDR[%x] length error at %ld\n",recid,asz); + sdr = &pcache[++asz]; /*try it if off-by-one*/ + } len = sdr[4] + 5; recid = sdr[0] + (sdr[1] << 8); + if (fdebug) printf("SDR[%x] len=%d i=%d offset=%lx\n",recid,len,i,asz); asz += len; - if (fdebug) printf("SDR[%x] len=%d i=%d\n", recid,len,i); } num = i; return(num); @@ -1565,6 +1580,8 @@ int find_sdr_next(uchar *psdr, uchar *pcache, ushort id) { // sdr = &pcache[i * SDR_SZ]; sdr = &pcache[asz]; + if (sdr[2] != 0x51) /* Dell SDR off-by-one error */ + sdr = &pcache[++asz]; len = sdr[4] + 5; recid = sdr[0] + (sdr[1] << 8); asz += len; @@ -2974,14 +2991,15 @@ int read_sdr_binfile(char *binfile, uchar **pbufret, int *buflen) } } #endif - fp = fopen(binfile,"r"); + fp = fopen(binfile,"rb"); if (fp == NULL) { ret = get_LastError(); printf("Cannot open file %s, error %d\n",binfile,ret); return(ret); } + fseek(fp, 0L, SEEK_SET); #ifndef WIN32 - { + { /*not windows but Linux, etc.*/ struct stat st; /* use fstat to get file size and allocate buffer */ ret = fstat(fileno(fp), &st); @@ -2993,15 +3011,17 @@ int read_sdr_binfile(char *binfile, uchar **pbufret, int *buflen) } } #endif - // len = nsdrs * SDR_SZ; /*estimate max size for n sdrs*/ + /* Could estimate size for nsdrs*SDR_SZ, but we don't yet know nsdrs. + * It is better to use the real file size detected above. */ sz_sdrs = len; pbuf = malloc(len); - if (fdebug) printf("restore: malloc(%d) pbuf=%p\n",len,pbuf); + if (fdebug) printf("sdr_binfile: malloc(%d) pbuf=%p\n",len,pbuf); if (pbuf == NULL) { ret = -1; fclose(fp); return(ret); } + psdrcache = pbuf; /*ok, so proceed with restore*/ ret = 0; len = (int)fread(pbuf, 1, sz_sdrs, fp); @@ -3009,6 +3029,12 @@ int read_sdr_binfile(char *binfile, uchar **pbufret, int *buflen) ret = get_LastError(); printf("Error %d reading file %s\n",ret,binfile); sz_sdrs = 0; /*for safety*/ + } else if (len < sz_sdrs) { + /* Show error if this happens in Windows */ + ret = get_LastError(); + printf("truncated fread(%s): attempted %d, got %d, error %d\n", + binfile,sz_sdrs,len,ret); + ret = 0; /*try to keep going*/ } fclose(fp); if (fdebug) { @@ -3339,7 +3365,7 @@ int i_sensor(int argc, char **argv) int len; ret = get_sdr_cache(&pbuf); if (ret == 0) { - fp = fopen(binfile,"w"); + fp = fopen(binfile,"wb"); if (fp == NULL) { ret = get_LastError(); printf("Cannot open file %s, error %d\n",binfile,ret); @@ -3439,6 +3465,10 @@ int i_sensor(int argc, char **argv) recnext = sdrdata[0] + (sdrdata[1] << 8); /*same as recid*/ if (fdebug) printf("find_sdr_next(%04x): ret = %d, next=%04x\n", recid,ret,recnext); + if (recid > 0 && recnext == 0) { + if (fdebug) printf("Error recid=%04x recnext=%04x\n",recid,recnext); + ret = 0; break; + } sz = sdrdata[4] + 5; } else { ret = GetSDR(recid,&recnext,sdrdata,sizeof(sdrdata),&sz); diff --git a/util/iserial.c b/util/iserial.c index af90f8f..07fc3cc 100644 --- a/util/iserial.c +++ b/util/iserial.c @@ -155,7 +155,7 @@ typedef struct /* * Global variables */ -static char * progver = "2.95"; +static char * progver = "2.96"; 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 c092361..50b0caf 100644 --- a/util/isol.c +++ b/util/isol.c @@ -165,7 +165,7 @@ void dbglog( char *pattn, ... ); /*local prototype*/ /* * Global variables */ -static char * progver = "2.95"; +static char * progver = "2.96"; static char * progname = "isol"; static char fdebug = 0; static char fpicmg = 0; diff --git a/util/itsol.c b/util/itsol.c index 64b1865..21e5f6c 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 = "2.95"; +static char * progver = "2.96"; 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 8486b3d..0e6d932 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 = "2.95"; +static char * progver = "2.96"; static char * progname = "iwdt"; static char fdebug = 0; static char fdontlog = 0; diff --git a/util/oem_dell.c b/util/oem_dell.c index ef2fe4c..0e16d95 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 = "2.95"; +static char * progver = "2.96"; static char * progname = "idelloem"; static int verbose = 0; static char fdebug = 0; diff --git a/util/oem_sun.c b/util/oem_sun.c index 8171915..65a3522 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 = "2.95"; +static char * progver = "2.96"; 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 fa0da75..5d7dee9 100644 --- a/util/oem_supermicro.c +++ b/util/oem_supermicro.c @@ -66,7 +66,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 = "2.95"; +static char * progver = "2.96"; static char * progname = "ismcoem"; static int verbose = 0; static char fdebug = 0; |