diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-05-08 22:59:06 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-05-08 22:59:06 +0200 |
commit | a7c8ed90be739a49937a229828c470f1ad01396e (patch) | |
tree | 4cd43ff357d98a1ce5afb3bb9449afcce5a299d1 /lib | |
parent | fa5ac2da06fae952fe1295a1e955bdb35e6d86c4 (diff) | |
parent | 342ebce798fe98ede64939a49bbc3770d8214649 (diff) |
Merge tag 'upstream/1.8.17'
Upstream version 1.8.17
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Makefile.am | 3 | ||||
-rw-r--r-- | lib/Makefile.in | 47 | ||||
-rw-r--r-- | lib/dimm_spd.c | 852 | ||||
-rw-r--r-- | lib/helper.c | 5 | ||||
-rw-r--r-- | lib/hpm2.c | 8 | ||||
-rw-r--r-- | lib/ipmi_chassis.c | 8 | ||||
-rwxr-xr-x | lib/ipmi_dcmi.c | 17 | ||||
-rw-r--r-- | lib/ipmi_delloem.c | 15 | ||||
-rw-r--r-- | lib/ipmi_ekanalyzer.c | 6 | ||||
-rw-r--r-- | lib/ipmi_event.c | 1 | ||||
-rw-r--r-- | lib/ipmi_fru.c | 65 | ||||
-rw-r--r-- | lib/ipmi_hpmfwupg.c | 31 | ||||
-rwxr-xr-x | lib/ipmi_ime.c | 2 | ||||
-rw-r--r-- | lib/ipmi_isol.c | 1 | ||||
-rw-r--r-- | lib/ipmi_main.c | 12 | ||||
-rw-r--r-- | lib/ipmi_mc.c | 2 | ||||
-rw-r--r-- | lib/ipmi_pef.c | 5 | ||||
-rw-r--r-- | lib/ipmi_picmg.c | 54 | ||||
-rw-r--r-- | lib/ipmi_sdr.c | 11 | ||||
-rw-r--r-- | lib/ipmi_sdradd.c | 1 | ||||
-rw-r--r-- | lib/ipmi_sel.c | 23 | ||||
-rw-r--r-- | lib/ipmi_sol.c | 6 | ||||
-rw-r--r-- | lib/ipmi_strings.c | 82 | ||||
-rw-r--r-- | lib/ipmi_sunoem.c | 8 | ||||
-rw-r--r-- | lib/ipmi_tsol.c | 2 | ||||
-rw-r--r-- | lib/ipmi_user.c | 15 | ||||
-rw-r--r-- | lib/log.c | 7 |
27 files changed, 1007 insertions, 282 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am index 2a316db..359cb30 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -28,7 +28,8 @@ # LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, # EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -INCLUDES = -I$(top_srcdir)/include +AUTOMAKE_OPTIONS = subdir-objects +AM_CPPFLAGS = -I$(top_srcdir)/include MAINTAINERCLEANFILES = Makefile.in noinst_LTLIBRARIES = libipmitool.la diff --git a/lib/Makefile.in b/lib/Makefile.in index 5c993cb..ccb468f 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -121,6 +121,7 @@ CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) +am__dirstamp = $(am__leading_dot)dirstamp am_libipmitool_la_OBJECTS = helper.lo ipmi_sdr.lo ipmi_sel.lo \ ipmi_sol.lo ipmi_pef.lo ipmi_lanp.lo ipmi_fru.lo \ ipmi_chassis.lo ipmi_mc.lo log.lo dimm_spd.lo ipmi_sensor.lo \ @@ -130,7 +131,7 @@ am_libipmitool_la_OBJECTS = helper.lo ipmi_sdr.lo ipmi_sel.lo \ ipmi_tsol.lo ipmi_firewall.lo ipmi_kontronoem.lo \ ipmi_hpmfwupg.lo ipmi_sdradd.lo ipmi_ekanalyzer.lo \ ipmi_gendev.lo ipmi_ime.lo ipmi_delloem.lo ipmi_dcmi.lo \ - hpm2.lo ipmi_vita.lo md5.lo + hpm2.lo ipmi_vita.lo ../src/plugins/lan/md5.lo libipmitool_la_OBJECTS = $(am_libipmitool_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -349,7 +350,8 @@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -INCLUDES = -I$(top_srcdir)/include +AUTOMAKE_OPTIONS = subdir-objects +AM_CPPFLAGS = -I$(top_srcdir)/include MAINTAINERCLEANFILES = Makefile.in noinst_LTLIBRARIES = libipmitool.la libipmitool_la_SOURCES = helper.c ipmi_sdr.c ipmi_sel.c ipmi_sol.c ipmi_pef.c \ @@ -410,16 +412,27 @@ clean-noinstLTLIBRARIES: echo rm -f $${locs}; \ rm -f $${locs}; \ } +../src/plugins/lan/$(am__dirstamp): + @$(MKDIR_P) ../src/plugins/lan + @: > ../src/plugins/lan/$(am__dirstamp) +../src/plugins/lan/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) ../src/plugins/lan/$(DEPDIR) + @: > ../src/plugins/lan/$(DEPDIR)/$(am__dirstamp) +../src/plugins/lan/md5.lo: ../src/plugins/lan/$(am__dirstamp) \ + ../src/plugins/lan/$(DEPDIR)/$(am__dirstamp) libipmitool.la: $(libipmitool_la_OBJECTS) $(libipmitool_la_DEPENDENCIES) $(EXTRA_libipmitool_la_DEPENDENCIES) $(AM_V_CCLD)$(libipmitool_la_LINK) $(libipmitool_la_OBJECTS) $(libipmitool_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) + -rm -f ../src/plugins/lan/*.$(OBJEXT) + -rm -f ../src/plugins/lan/*.lo distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@../src/plugins/lan/$(DEPDIR)/md5.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dimm_spd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helper.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hpm2.Plo@am__quote@ @@ -456,41 +469,37 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_user.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_vita.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Plo@am__quote@ .c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< -md5.lo: ../src/plugins/lan/md5.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT md5.lo -MD -MP -MF $(DEPDIR)/md5.Tpo -c -o md5.lo `test -f '../src/plugins/lan/md5.c' || echo '$(srcdir)/'`../src/plugins/lan/md5.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/md5.Tpo $(DEPDIR)/md5.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../src/plugins/lan/md5.c' object='md5.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o md5.lo `test -f '../src/plugins/lan/md5.c' || echo '$(srcdir)/'`../src/plugins/lan/md5.c - mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs + -rm -rf ../src/plugins/lan/.libs ../src/plugins/lan/_libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -604,6 +613,8 @@ clean-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) + -rm -f ../src/plugins/lan/$(DEPDIR)/$(am__dirstamp) + -rm -f ../src/plugins/lan/$(am__dirstamp) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -615,7 +626,7 @@ clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am - -rm -rf ./$(DEPDIR) + -rm -rf ../src/plugins/lan/$(DEPDIR) ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -661,7 +672,7 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) + -rm -rf ../src/plugins/lan/$(DEPDIR) ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic diff --git a/lib/dimm_spd.c b/lib/dimm_spd.c index 912b211..8b6927c 100644 --- a/lib/dimm_spd.c +++ b/lib/dimm_spd.c @@ -186,123 +186,123 @@ const struct valstr jedec_id1_vals[] = { { 0x07, "Hitachi" }, { 0x08, "Inmos" }, { 0x89, "Intel" }, - { 0x8a, "I.T.T." }, - { 0x0b, "Intersil" }, - { 0x8c, "Monolithic Memories" }, - { 0x0d, "Mostek" }, - { 0x0e, "Motorola" }, - { 0x8f, "National" }, + { 0x8A, "I.T.T." }, + { 0x0B, "Intersil" }, + { 0x8C, "Monolithic Memories" }, + { 0x0D, "Mostek" }, + { 0x0E, "Freescale (Motorola)" }, + { 0x8F, "National" }, { 0x10, "NEC" }, { 0x91, "RCA" }, { 0x92, "Raytheon" }, { 0x13, "Conexant (Rockwell)" }, { 0x94, "Seeq" }, - { 0x15, "Philips Semi. (Signetics)" }, + { 0x15, "NXP (Philips)" }, { 0x16, "Synertek" }, { 0x97, "Texas Instruments" }, { 0x98, "Toshiba" }, { 0x19, "Xicor" }, - { 0x1a, "Zilog" }, - { 0x9b, "Eurotechnique" }, - { 0x1c, "Mitsubishi" }, - { 0x9d, "Lucent (AT&T)" }, - { 0x9e, "Exel" }, - { 0x1f, "Atmel" }, - { 0x20, "SGS/Thomson" }, - { 0xa1, "Lattice Semi." }, - { 0xa2, "NCR" }, + { 0x1A, "Zilog" }, + { 0x9B, "Eurotechnique" }, + { 0x1C, "Mitsubishi" }, + { 0x9D, "Lucent (AT&T)" }, + { 0x9E, "Exel" }, + { 0x1F, "Atmel" }, + { 0x20, "STMicroelectronics" }, + { 0xA1, "Lattice Semi." }, + { 0xA2, "NCR" }, { 0x23, "Wafer Scale Integration" }, - { 0xa4, "IBM" }, + { 0xA4, "IBM" }, { 0x25, "Tristar" }, { 0x26, "Visic" }, - { 0xa7, "Intl. CMOS Technology" }, - { 0xa8, "SSSI" }, - { 0x29, "Microchip Technology" }, - { 0x2a, "Ricoh Ltd." }, - { 0xab, "VLSI" }, - { 0x2c, "Micron Technology" }, - { 0xad, "Hyundai Electronics" }, - { 0xae, "OKI Semiconductor" }, - { 0x2f, "ACTEL" }, - { 0xb0, "Sharp" }, + { 0xA7, "Intl. CMOS Technology" }, + { 0xA8, "SSSI" }, + { 0x29, "MicrochipTechnology" }, + { 0x2A, "Ricoh Ltd." }, + { 0xAB, "VLSI" }, + { 0x2C, "Micron Technology" }, + { 0xAD, "SK Hynix" }, + { 0xAE, "OKI Semiconductor" }, + { 0x2F, "ACTEL" }, + { 0xB0, "Sharp" }, { 0x31, "Catalyst" }, { 0x32, "Panasonic" }, - { 0xb3, "IDT" }, + { 0xB3, "IDT" }, { 0x34, "Cypress" }, - { 0xb5, "DEC" }, - { 0xb6, "LSI Logic" }, - { 0x37, "Zarlink" }, + { 0xB5, "DEC" }, + { 0xB6, "LSI Logic" }, + { 0x37, "Zarlink (Plessey)" }, { 0x38, "UTMC" }, - { 0xb9, "Thinking Machine" }, - { 0xba, "Thomson CSF" }, - { 0x3b, "Integrated CMOS(Vertex)" }, - { 0xbc, "Honeywell" }, - { 0x3d, "Tektronix" }, - { 0x3e, "Sun Microsystems" }, - { 0xbf, "SST" }, - { 0x40, "MOSEL" }, - { 0xc1, "Infineon" }, - { 0xc2, "Macronix" }, + { 0xB9, "Thinking Machine" }, + { 0xBA, "Thomson CSF" }, + { 0x3B, "Integrated CMOS (Vertex)" }, + { 0xBC, "Honeywell" }, + { 0x3D, "Tektronix" }, + { 0x3E, "Oracle Corporation" }, + { 0xBF, "Silicon Storage Technology" }, + { 0x40, "ProMos/Mosel Vitelic" }, + { 0xC1, "Infineon (Siemens)" }, + { 0xC2, "Macronix" }, { 0x43, "Xerox" }, - { 0xc4, "Plus Logic" }, - { 0x45, "SunDisk" }, + { 0xC4, "Plus Logic" }, + { 0x45, "SanDisk Corporation" }, { 0x46, "Elan Circuit Tech." }, - { 0xc7, "European Silicon Str." }, - { 0xc8, "Apple Computer" }, - { 0xc9, "Xilinx" }, - { 0x4a, "Compaq" }, - { 0xcb, "Protocol Engines" }, - { 0x4c, "SCI" }, - { 0xcd, "Seiko Instruments" }, - { 0xce, "Samsung" }, - { 0x4f, "I3 Design System" }, - { 0xd0, "Klic" }, + { 0xC7, "European Silicon Str." }, + { 0xC8, "Apple Computer" }, + { 0x49, "Xilinx" }, + { 0x4A, "Compaq" }, + { 0xCB, "Protocol Engines" }, + { 0x4C, "SCI" }, + { 0xCD, "Seiko Instruments" }, + { 0xCE, "Samsung" }, + { 0x4F, "I3 Design System" }, + { 0xD0, "Klic" }, { 0x51, "Crosspoint Solutions" }, { 0x52, "Alliance Semiconductor" }, - { 0xd3, "Tandem" }, + { 0xD3, "Tandem" }, { 0x54, "Hewlett-Packard" }, - { 0xd5, "Intg. Silicon Solutions" }, - { 0xd6, "Brooktree" }, + { 0xD5, "Integrated Silicon Solutions" }, + { 0xD6, "Brooktree" }, { 0x57, "New Media" }, { 0x58, "MHS Electronic" }, - { 0xd9, "Performance Semi." }, - { 0xda, "Winbond Electronic" }, - { 0x5b, "Kawasaki Steel" }, - { 0xdc, "Bright Micro" }, - { 0x5d, "TECMAR" }, - { 0x5e, "Exar" }, - { 0xdf, "PCMCIA" }, - { 0xe0, "LG Semiconductor" }, + { 0xD9, "Performance Semi." }, + { 0xDA, "Winbond Electronic" }, + { 0x5B, "Kawasaki Steel" }, + { 0xDC, "Bright Micro" }, + { 0x5D, "TECMAR" }, + { 0x5E, "Exar" }, + { 0xDF, "PCMCIA" }, + { 0xE0, "LG Semi (Goldstar)" }, { 0x61, "Northern Telecom" }, { 0x62, "Sanyo" }, - { 0xe3, "Array Microsystems" }, + { 0xE3, "Array Microsystems" }, { 0x64, "Crystal Semiconductor" }, - { 0xe5, "Analog Devices" }, - { 0xe6, "PMC-Sierra" }, + { 0xE5, "Analog Devices" }, + { 0xE6, "PMC-Sierra" }, { 0x67, "Asparix" }, { 0x68, "Convex Computer" }, - { 0xe9, "Quality Semiconductor" }, - { 0xea, "Nimbus Technology" }, - { 0x6b, "Transwitch" }, - { 0xec, "Micronas (ITT Intermetall)" }, - { 0x6d, "Cannon" }, - { 0x6e, "Altera" }, - { 0xef, "NEXCOM" }, - { 0x70, "QUALCOMM" }, - { 0xf1, "Sony" }, - { 0xf2, "Cray Research" }, - { 0x73, "AMS (Austria Micro)" }, - { 0xf4, "Vitesse" }, + { 0xE9, "Quality Semiconductor" }, + { 0xEA, "Nimbus Technology" }, + { 0x6B, "Transwitch" }, + { 0xEC, "Micronas (ITT Intermetall)" }, + { 0x6D, "Cannon" }, + { 0x6E, "Altera" }, + { 0xEF, "NEXCOM" }, + { 0x70, "Qualcomm" }, + { 0xF1, "Sony" }, + { 0xF2, "Cray Research" }, + { 0x73, "AMS(Austria Micro)" }, + { 0xF4, "Vitesse" }, { 0x75, "Aster Electronics" }, { 0x76, "Bay Networks (Synoptic)" }, - { 0xf7, "Zentrum" }, - { 0xf8, "TRW" }, + { 0xF7, "Zentrum/ZMD" }, + { 0xF8, "TRW" }, { 0x79, "Thesys" }, - { 0x7a, "Solbourne Computer" }, - { 0xfb, "Allied-Signal" }, - { 0x7c, "Dialog" }, - { 0xfd, "Media Vision" }, - { 0xfe, "Level One Communication" }, + { 0x7A, "Solbourne Computer" }, + { 0xFB, "Allied-Signal" }, + { 0x7C, "Dialog Semiconductor" }, + { 0xFD, "Media Vision" }, + { 0xFE, "Numonyx Corporation" }, { 0x00, NULL }, }; @@ -314,7 +314,7 @@ const struct valstr jedec_id2_vals[] = { { 0x85, "Micro Linear" }, { 0x86, "Univ. of NC" }, { 0x07, "JTAG Technologies" }, - { 0x08, "Loral" }, + { 0x08, "BAE Systems (Loral)" }, { 0x89, "Nchip" }, { 0x8A, "Galileo Tech" }, { 0x0B, "Bestlink Systems" }, @@ -324,7 +324,7 @@ const struct valstr jedec_id2_vals[] = { { 0x8F, "Robert Bosch" }, { 0x10, "Chip Express" }, { 0x91, "DATARAM" }, - { 0x92, "United Microelec Corp." }, + { 0x92, "United Microelectronics Corp." }, { 0x13, "TCSI" }, { 0x94, "Smart Modular" }, { 0x15, "Hughes Aircraft" }, @@ -335,7 +335,7 @@ const struct valstr jedec_id2_vals[] = { { 0x1A, "Ericsson Components" }, { 0x9B, "SpaSE" }, { 0x1C, "Eon Silicon Devices" }, - { 0x9D, "Programmable Micro Corp" }, + { 0x9D, "Integrated Silicon Solution (ISSI)" }, { 0x9E, "DoD" }, { 0x1F, "Integ. Memories Tech." }, { 0x20, "Corollary Inc." }, @@ -343,10 +343,10 @@ const struct valstr jedec_id2_vals[] = { { 0xA2, "Omnivision" }, { 0x23, "EIV(Switzerland)" }, { 0xA4, "Novatel Wireless" }, - { 0x25, "Zarlink (formerly Mitel)" }, + { 0x25, "Zarlink (Mitel)" }, { 0x26, "Clearpoint" }, { 0xA7, "Cabletron" }, - { 0xA8, "Silicon Technology" }, + { 0xA8, "STEC (Silicon Tech)" }, { 0x29, "Vanguard" }, { 0x2A, "Hagiwara Sys-Com" }, { 0xAB, "Vantis" }, @@ -356,7 +356,7 @@ const struct valstr jedec_id2_vals[] = { { 0x2F, "Rohm Company Ltd." }, { 0xB0, "Juniper Networks" }, { 0x31, "Libit Signal Processing" }, - { 0x32, "Enhanced Memories Inc." }, + { 0x32, "Mushkin Enhanced Memory" }, { 0xB3, "Tundra Semiconductor" }, { 0x34, "Adaptec Inc." }, { 0xB5, "LightSpeed Semi." }, @@ -364,7 +364,7 @@ const struct valstr jedec_id2_vals[] = { { 0x37, "AMIC Technology" }, { 0x38, "Adobe Systems" }, { 0xB9, "Dynachip" }, - { 0xBA, "PNY Electronics" }, + { 0xBA, "PNY Technologies, Inc." }, { 0x3B, "Newport Digital" }, { 0xBC, "MMC Networks" }, { 0x3D, "T Square" }, @@ -372,12 +372,12 @@ const struct valstr jedec_id2_vals[] = { { 0xBF, "Broadcom" }, { 0x40, "Viking Components" }, { 0xC1, "V3 Semiconductor" }, - { 0xC2, "Flextronics (formerly Orbit)" }, + { 0xC2, "Flextronics (Orbit Semiconductor)" }, { 0x43, "Suwa Electronics" }, { 0xC4, "Transmeta" }, { 0x45, "Micron CMS" }, - { 0x46, "American Computer & Digital Components Inc" }, - { 0xC7, "Enhance 3000 Inc" }, + { 0x46, "American Computer & Digital Components Inc." }, + { 0xC7, "Enhance 3000 Inc." }, { 0xC8, "Tower Semiconductor" }, { 0x49, "CPU Design" }, { 0x4A, "Price Point" }, @@ -407,7 +407,7 @@ const struct valstr jedec_id2_vals[] = { { 0x62, "Super PC Memory" }, { 0xE3, "MGV Memory" }, { 0x64, "Galvantech" }, - { 0xE5, "Gadzoox Nteworks" }, + { 0xE5, "Gadzoox Networks" }, { 0xE6, "Multi Dimensional Cons." }, { 0x67, "GateField" }, { 0x68, "Integrated Memory System" }, @@ -448,7 +448,7 @@ const struct valstr jedec_id3_vals[] = { { 0x89, "Switchcore" }, { 0x8A, "Cisco Systems, Inc." }, { 0x0B, "Allayer Technologies" }, - { 0x8C, "WorkX AG" }, + { 0x8C, "WorkX AG (Wichman)" }, { 0x0D, "Oasis Semiconductor" }, { 0x0E, "Novanet Semiconductor" }, { 0x8F, "E-M Solutions" }, @@ -469,7 +469,7 @@ const struct valstr jedec_id3_vals[] = { { 0x9E, "Corsair" }, { 0x1F, "Actrans System Inc." }, { 0x20, "ALPHA Technologies" }, - { 0xA1, "Cygnal Integrated Products Incorporated" }, + { 0xA1, "Silicon Laboratories, Inc. (Cygnal)" }, { 0xA2, "Artesyn Technologies" }, { 0x23, "Align Manufacturing" }, { 0xA4, "Peregrine Semiconductor" }, @@ -480,12 +480,12 @@ const struct valstr jedec_id3_vals[] = { { 0x29, "ADTEC Corporation" }, { 0x2A, "Kentron Technologies" }, { 0xAB, "Win Technologies" }, - { 0x2C, "ASIC Designs Inc" }, + { 0x2C, "Tezzaron Semiconductor" }, { 0xAD, "Extreme Packet Devices" }, { 0xAE, "RF Micro Devices" }, { 0x2F, "Siemens AG" }, { 0xB0, "Sarnoff Corporation" }, - { 0x31, "Itautec Philco SA" }, + { 0x31, "Itautec SA" }, { 0x32, "Radiata Inc." }, { 0xB3, "Benchmark Elect. (AVEX)" }, { 0x34, "Legend" }, @@ -513,7 +513,7 @@ const struct valstr jedec_id3_vals[] = { { 0x4A, "W.L. Gore" }, { 0xCB, "HanBit Electronics" }, { 0x4C, "GlobeSpan" }, - { 0xCD, "Element 14" }, + { 0xCD, "Element 14" }, { 0xCE, "Pycon" }, { 0x4F, "Saifun Semiconductors" }, { 0xD0, "Sibyte, Incorporated" }, @@ -527,7 +527,7 @@ const struct valstr jedec_id3_vals[] = { { 0x58, "Malaysia Micro Solutions" }, { 0xD9, "Hyperchip" }, { 0xDA, "Gemstone Communications" }, - { 0x5B, "Anadyne Microelectronics" }, + { 0x5B, "Anadigm (Anadyne)" }, { 0xDC, "3ParData" }, { 0x5D, "Mellanox Technologies" }, { 0x5E, "Tenx Technologies" }, @@ -536,7 +536,7 @@ const struct valstr jedec_id3_vals[] = { { 0x61, "Skyup Technology" }, { 0x62, "HiNT Corporation" }, { 0xE3, "Chiaro" }, - { 0x64, "MCI Computer GMBH" }, + { 0x64, "MDT Technologies GmbH" }, { 0xE5, "Exbit Technology A/S" }, { 0xE6, "Integrated Technology Express" }, { 0x67, "AVED Memory" }, @@ -586,7 +586,7 @@ const struct valstr jedec_id4_vals[] = { { 0x91, "NeoMagic" }, { 0x92, "AuroraNetics" }, { 0x13, "Golden Empire" }, - { 0x94, "Muskin" }, + { 0x94, "Mushkin" }, { 0x15, "Tioga Technologies" }, { 0x16, "Netlist" }, { 0x97, "TeraLogic" }, @@ -628,7 +628,7 @@ const struct valstr jedec_id4_vals[] = { { 0x3B, "Concept Computer" }, { 0xBC, "SILCOM" }, { 0x3D, "3Dlabs" }, - { 0x3E, "ct Magazine" }, + { 0x3E, "c’t Magazine" }, { 0xBF, "Sanera Systems" }, { 0x40, "Silicon Packets" }, { 0xC1, "Viasystems Group" }, @@ -654,13 +654,13 @@ const struct valstr jedec_id4_vals[] = { { 0xD5, "Silverback Systems" }, { 0xD6, "Jade Star Technologies" }, { 0x57, "Pijnenburg Securealink" }, - { 0x58, "MemorySolutioN" }, + { 0x58, "takeMS - Ultron AG" }, { 0xD9, "Cambridge Silicon Radio" }, { 0xDA, "Swissbit" }, { 0x5B, "Nazomi Communications" }, { 0xDC, "eWave System" }, { 0x5D, "Rockwell Collins" }, - { 0x5E, "PAION" }, + { 0x5E, "Picocel Co. Ltd. (Paion)" }, { 0xDF, "Alphamosaic Ltd" }, { 0xE0, "Sandburst" }, { 0x61, "SiCon Video" }, @@ -669,16 +669,17 @@ const struct valstr jedec_id4_vals[] = { { 0x64, "PrairieComm" }, { 0xE5, "Mitac International" }, { 0xE6, "Layer N Networks" }, - { 0x67, "Atsana Semiconductor" }, + { 0x67, "MtekVision (Atsana)" }, { 0x68, "Allegro Networks" }, { 0xE9, "Marvell Semiconductors" }, { 0xEA, "Netergy Microelectronic" }, { 0x6B, "NVIDIA" }, { 0xEC, "Internet Machines" }, - { 0x6D, "Peak Electronics" }, + { 0x6D, "Memorysolution GmbH" }, + { 0x6E, "Litchfield Communication" }, { 0xEF, "Accton Technology" }, { 0x70, "Teradiant Networks" }, - { 0xF1, "Europe Technologies" }, + { 0xF1, "Scaleo Chip" }, { 0xF2, "Cortina Systems" }, { 0x73, "RAM Components" }, { 0xF4, "Raqia Networks" }, @@ -711,7 +712,7 @@ const struct valstr jedec_id5_vals[] = { { 0x0D, "Patriot Scientific" }, { 0x0E, "Neoaxiom Corporation" }, { 0x8F, "3Y Power Technology" }, - { 0x10, "Europe Technologies" }, + { 0x10, "Scaleo Chip" }, { 0x91, "Potentia Power Systems" }, { 0x92, "C-guys Incorporated" }, { 0x13, "Digital Communications Technology Incorporated" }, @@ -721,22 +722,22 @@ const struct valstr jedec_id5_vals[] = { { 0x97, "XIOtech Corporation" }, { 0x98, "PortalPlayer" }, { 0x19, "Zhiying Software" }, - { 0x1A, "Direct2Data" }, + { 0x1A, "ParkerVision, Inc." }, { 0x9B, "Phonex Broadband" }, { 0x1C, "Skyworks Solutions" }, { 0x9D, "Entropic Communications" }, - { 0x9E, "Pacific Force Technology" }, + { 0x9E, "I’M Intelligent Memory Ltd." }, { 0x1F, "Zensys A/S" }, { 0x20, "Legend Silicon Corp." }, - { 0xA1, "sci-worx GmbH" }, - { 0xA2, "Oasis Silicon Systems" }, - { 0x23, "Renesas Technology" }, + { 0xA1, "Sci-worx GmbH" }, + { 0xA2, "SMSC (Standard Microsystems)" }, + { 0x23, "Renesas Electronics" }, { 0xA4, "Raza Microelectronics" }, { 0x25, "Phyworks" }, { 0x26, "MediaTek" }, { 0xA7, "Non-cents Productions" }, { 0xA8, "US Modular" }, - { 0x29, "Wintegra Ltd" }, + { 0x29, "Wintegra Ltd." }, { 0x2A, "Mathstar" }, { 0xAB, "StarCore" }, { 0x2C, "Oplus Technologies" }, @@ -772,6 +773,559 @@ const struct valstr jedec_id5_vals[] = { { 0x4A, "Excel Semiconductor" }, { 0xCB, "A-DATA Technology" }, { 0x4C, "VirtualDigm" }, + { 0xCD, "G Skill Intl" }, + { 0xCE, "Quanta Computer" }, + { 0x4F, "Yield Microelectronics" }, + { 0xD0, "Afa Technologies" }, + { 0x51, "KINGBOX Technology Co. Ltd." }, + { 0x52, "Ceva" }, + { 0xD3, "iStor Networks" }, + { 0x54, "Advance Modules" }, + { 0xD5, "Microsoft" }, + { 0xD6, "Open-Silicon" }, + { 0x57, "Goal Semiconductor" }, + { 0x58, "ARC International" }, + { 0xD9, "Simmtec" }, + { 0xDA, "Metanoia" }, + { 0x5B, "Key Stream" }, + { 0xDC, "Lowrance Electronics" }, + { 0x5D, "Adimos" }, + { 0x5E, "SiGe Semiconductor" }, + { 0xDF, "Fodus Communications" }, + { 0xE0, "Credence Systems Corp." }, + { 0x61, "Genesis Microchip Inc." }, + { 0x62, "Vihana, Inc." }, + { 0xE3, "WIS Technologies" }, + { 0x64, "GateChange Technologies" }, + { 0xE5, "High Density Devices AS" }, + { 0xE6, "Synopsys" }, + { 0x67, "Gigaram" }, + { 0x68, "Enigma Semiconductor Inc." }, + { 0xE9, "Century Micro Inc." }, + { 0xEA, "Icera Semiconductor" }, + { 0x6B, "Mediaworks Integrated Systems" }, + { 0xEC, "O’Neil Product Development" }, + { 0x6D, "Supreme Top Technology Ltd." }, + { 0x6E, "MicroDisplay Corporation" }, + { 0xEF, "Team Group Inc." }, + { 0x70, "Sinett Corporation" }, + { 0xF1, "Toshiba Corporation" }, + { 0xF2, "Tensilica" }, + { 0x73, "SiRF Technology" }, + { 0xF4, "Bacoc Inc." }, + { 0x75, "SMaL Camera Technologies" }, + { 0x76, "Thomson SC" }, + { 0xF7, "Airgo Networks" }, + { 0xF8, "Wisair Ltd." }, + { 0x79, "SigmaTel" }, + { 0x7A, "Arkados" }, + { 0xFB, "Compete IT gmbH Co. KG" }, + { 0x7C, "Eudar Technology Inc." }, + { 0xFD, "Focus Enhancements" }, + { 0xFE, "Xyratex" }, + { 0x00, NULL }, +}; + +const struct valstr jedec_id6_vals[] = { + { 0x01, "Specular Networks" }, + { 0x02, "Patriot Memory (PDP Systems)" }, + { 0x83, "U-Chip Technology Corp." }, + { 0x04, "Silicon Optix" }, + { 0x85, "Greenfield Networks" }, + { 0x86, "CompuRAM GmbH" }, + { 0x07, "Stargen, Inc." }, + { 0x08, "NetCell Corporation" }, + { 0x89, "Excalibrus Technologies Ltd" }, + { 0x8A, "SCM Microsystems" }, + { 0x0B, "Xsigo Systems, Inc." }, + { 0x8C, "CHIPS & Systems Inc" }, + { 0x0D, "Tier 1 Multichip Solutions" }, + { 0x0E, "CWRL Labs" }, + { 0x8F, "Teradici" }, + { 0x10, "Gigaram, Inc." }, + { 0x91, "g2 Microsystems" }, + { 0x92, "PowerFlash Semiconductor" }, + { 0x13, "P.A. Semi, Inc." }, + { 0x94, "NovaTech Solutions, S.A." }, + { 0x15, "c2 Microsystems, Inc." }, + { 0x16, "Level5 Networks" }, + { 0x97, "COS Memory AG" }, + { 0x98, "Innovasic Semiconductor" }, + { 0x19, "02IC Co. Ltd" }, + { 0x1A, "Tabula, Inc." }, + { 0x9B, "Crucial Technology" }, + { 0x1C, "Chelsio Communications" }, + { 0x9D, "Solarflare Communications" }, + { 0x9E, "Xambala Inc." }, + { 0x1F, "EADS Astrium" }, + { 0x20, "Terra Semiconductor, Inc." }, + { 0xA1, "Imaging Works, Inc." }, + { 0xA2, "Astute Networks, Inc." }, + { 0x23, "Tzero" }, + { 0xA4, "Emulex" }, + { 0x25, "Power-One" }, + { 0x26, "Pulse~LINK Inc." }, + { 0xA7, "Hon Hai Precision Industry" }, + { 0xA8, "White Rock Networks Inc." }, + { 0x29, "Telegent Systems USA, Inc." }, + { 0x2A, "Atrua Technologies, Inc." }, + { 0xAB, "Acbel Polytech Inc." }, + { 0x2C, "eRide Inc." }, + { 0xAD, "ULi Electronics Inc." }, + { 0xAE, "Magnum Semiconductor Inc." }, + { 0x2F, "neoOne Technology, Inc." }, + { 0xB0, "Connex Technology, Inc." }, + { 0x31, "Stream Processors, Inc." }, + { 0x32, "Focus Enhancements" }, + { 0xB3, "Telecis Wireless, Inc." }, + { 0x34, "uNav Microelectronics" }, + { 0xB5, "Tarari, Inc." }, + { 0xB6, "Ambric, Inc." }, + { 0x37, "Newport Media, Inc." }, + { 0x38, "VMTS" }, + { 0xB9, "Enuclia Semiconductor, Inc." }, + { 0xBA, "Virtium Technology Inc." }, + { 0x3B, "Solid State System Co., Ltd." }, + { 0xBC, "Kian Tech LLC" }, + { 0x3D, "Artimi" }, + { 0x3E, "Power Quotient International" }, + { 0xBF, "Avago Technologies" }, + { 0x40, "ADTechnology" }, + { 0xC1, "Sigma Designs" }, + { 0xC2, "SiCortex, Inc." }, + { 0x43, "Ventura Technology Group" }, + { 0xC4, "eASIC" }, + { 0x45, "M.H.S. SAS" }, + { 0x46, "Micro Star International" }, + { 0xC7, "Rapport Inc." }, + { 0xC8, "Makway International" }, + { 0x49, "Broad Reach Engineering Co." }, + { 0x4A, "Semiconductor Mfg Intl Corp" }, + { 0xCB, "SiConnect" }, + { 0x4C, "FCI USA Inc." }, + { 0xCD, "Validity Sensors" }, + { 0xCE, "Coney Technology Co. Ltd." }, + { 0x4F, "Spans Logic" }, + { 0xD0, "Neterion Inc." }, + { 0x51, "Qimonda" }, + { 0x52, "New Japan Radio Co. Ltd." }, + { 0xD3, "Velogix" }, + { 0x54, "Montalvo Systems" }, + { 0xD5, "iVivity Inc." }, + { 0xD6, "Walton Chaintech" }, + { 0x57, "AENEON" }, + { 0x58, "Lorom Industrial Co. Ltd." }, + { 0xD9, "Radiospire Networks" }, + { 0xDA, "Sensio Technologies, Inc." }, + { 0x5B, "Nethra Imaging" }, + { 0xDC, "Hexon Technology Pte Ltd" }, + { 0x5D, "CompuStocx (CSX)" }, + { 0x5E, "Methode Electronics, Inc." }, + { 0xDF, "Connect One Ltd." }, + { 0xE0, "Opulan Technologies" }, + { 0x61, "Septentrio NV" }, + { 0x62, "Goldenmars Technology Inc." }, + { 0xE3, "Kreton Corporation" }, + { 0x64, "Cochlear Ltd." }, + { 0xE5, "Altair Semiconductor" }, + { 0xE6, "NetEffect, Inc." }, + { 0x67, "Spansion, Inc." }, + { 0x68, "Taiwan Semiconductor Mfg" }, + { 0xE9, "Emphany Systems Inc." }, + { 0xEA, "ApaceWave Technologies" }, + { 0x6B, "Mobilygen Corporation" }, + { 0xEC, "Tego" }, + { 0x6D, "Cswitch Corporation" }, + { 0x6E, "Haier (Beijing) IC Design Co." }, + { 0xEF, "MetaRAM" }, + { 0x70, "Axel Electronics Co. Ltd." }, + { 0xF1, "Tilera Corporation" }, + { 0xF2, "Aquantia" }, + { 0x73, "Vivace Semiconductor" }, + { 0xF4, "Redpine Signals" }, + { 0x75, "Octalica" }, + { 0x76, "InterDigital Communications" }, + { 0xF7, "Avant Technology" }, + { 0xF8, "Asrock, Inc." }, + { 0x79, "Availink" }, + { 0x7A, "Quartics, Inc." }, + { 0xFB, "Element CXI" }, + { 0x7C, "Innovaciones Microelectronicas" }, + { 0xFD, "VeriSilicon Microelectronics" }, + { 0xFE, "W5 Networks" }, + { 0x00, NULL }, +}; + +const struct valstr jedec_id7_vals[] = { + { 0x01, "MOVEKING" }, + { 0x02, "Mavrix Technology, Inc." }, + { 0x83, "CellGuide Ltd." }, + { 0x04, "Faraday Technology" }, + { 0x85, "Diablo Technologies, Inc." }, + { 0x86, "Jennic" }, + { 0x07, "Octasic" }, + { 0x08, "Molex Incorporated" }, + { 0x89, "3Leaf Networks" }, + { 0x8A, "Bright Micron Technology" }, + { 0x0B, "Netxen" }, + { 0x8C, "NextWave Broadband Inc." }, + { 0x0D, "DisplayLink" }, + { 0x0E, "ZMOS Technology" }, + { 0x8F, "Tec-Hill" }, + { 0x10, "Multigig, Inc." }, + { 0x91, "Amimon" }, + { 0x92, "Euphonic Technologies, Inc." }, + { 0x13, "BRN Phoenix" }, + { 0x94, "InSilica" }, + { 0x15, "Ember Corporation" }, + { 0x16, "Avexir Technologies Corporation" }, + { 0x97, "Echelon Corporation" }, + { 0x98, "Edgewater Computer Systems" }, + { 0x19, "XMOS Semiconductor Ltd." }, + { 0x1A, "GENUSION, Inc." }, + { 0x9B, "Memory Corp NV" }, + { 0x1C, "SiliconBlue Technologies" }, + { 0x9D, "Rambus Inc." }, + { 0x9E, "Andes Technology Corporation" }, + { 0x1F, "Coronis Systems" }, + { 0x20, "Achronix Semiconductor" }, + { 0xA1, "Siano Mobile Silicon Ltd." }, + { 0xA2, "Semtech Corporation" }, + { 0x23, "Pixelworks Inc." }, + { 0xA4, "Gaisler Research AB" }, + { 0x25, "Teranetics" }, + { 0x26, "Toppan Printing Co. Ltd." }, + { 0xA7, "Kingxcon" }, + { 0xA8, "Silicon Integrated Systems" }, + { 0x29, "I-O Data Device, Inc." }, + { 0x2A, "NDS Americas Inc." }, + { 0xAB, "Solomon Systech Limited" }, + { 0x2C, "On Demand Microelectronics" }, + { 0xAD, "Amicus Wireless Inc." }, + { 0xAE, "SMARDTV SNC" }, + { 0x2F, "Comsys Communication Ltd." }, + { 0xB0, "Movidia Ltd." }, + { 0x31, "Javad GNSS, Inc." }, + { 0x32, "Montage Technology Group" }, + { 0xB3, "Trident Microsystems" }, + { 0x34, "Super Talent" }, + { 0xB5, "Optichron, Inc." }, + { 0xB6, "Future Waves UK Ltd." }, + { 0x37, "SiBEAM, Inc." }, + { 0x38, "Inicore,Inc." }, + { 0xB9, "Virident Systems" }, + { 0xBA, "M2000, Inc." }, + { 0x3B, "ZeroG Wireless, Inc." }, + { 0xBC, "Gingle Technology Co. Ltd." }, + { 0x3D, "Space Micro Inc." }, + { 0x3E, "Wilocity" }, + { 0xBF, "Novafora, Inc." }, + { 0x40, "iKoa Corporation" }, + { 0xC1, "ASint Technology" }, + { 0xC2, "Ramtron" }, + { 0x43, "Plato Networks Inc." }, + { 0xC4, "IPtronics AS" }, + { 0x45, "Infinite-Memories" }, + { 0x46, "Parade Technologies Inc." }, + { 0xC7, "Dune Networks" }, + { 0xC8, "GigaDevice Semiconductor" }, + { 0x49, "Modu Ltd." }, + { 0x4A, "CEITEC" }, + { 0xCB, "Northrop Grumman" }, + { 0x4C, "XRONET Corporation" }, + { 0xCD, "Sicon Semiconductor AB" }, + { 0xCE, "Atla Electronics Co. Ltd." }, + { 0x4F, "TOPRAM Technology" }, + { 0xD0, "Silego Technology Inc." }, + { 0x51, "Kinglife" }, + { 0x52, "Ability Industries Ltd." }, + { 0xD3, "Silicon Power Computer & Communications" }, + { 0x54, "Augusta Technology, Inc." }, + { 0xD5, "Nantronics Semiconductors" }, + { 0xD6, "Hilscher Gesellschaft" }, + { 0x57, "Quixant Ltd." }, + { 0x58, "Percello Ltd." }, + { 0xD9, "NextIO Inc." }, + { 0xDA, "Scanimetrics Inc." }, + { 0x5B, "FS-Semi Company Ltd." }, + { 0xDC, "Infinera Corporation" }, + { 0x5D, "SandForce Inc." }, + { 0x5E, "Lexar Media" }, + { 0xDF, "Teradyne Inc." }, + { 0xE0, "Memory Exchange Corp." }, + { 0x61, "Suzhou Smartek Electronics" }, + { 0x62, "Avantium Corporation" }, + { 0xE3, "ATP Electronics Inc." }, + { 0x64, "Valens Semiconductor Ltd" }, + { 0xE5, "Agate Logic, Inc." }, + { 0xE6, "Netronome" }, + { 0x67, "Zenverge, Inc." }, + { 0x68, "N-trig Ltd" }, + { 0xE9, "SanMax Technologies Inc." }, + { 0xEA, "Contour Semiconductor Inc." }, + { 0x6B, "TwinMOS" }, + { 0xEC, "Silicon Systems, Inc." }, + { 0x6D, "V-Color Technology Inc." }, + { 0x6E, "Certicom Corporation" }, + { 0xEF, "JSC ICC Milandr" }, + { 0x70, "PhotoFast Global Inc." }, + { 0xF1, "InnoDisk Corporation" }, + { 0xF2, "Muscle Power" }, + { 0x73, "Energy Micro" }, + { 0xF4, "Innofidei" }, + { 0x75, "CopperGate Communications" }, + { 0x76, "Holtek Semiconductor Inc." }, + { 0xF7, "Myson Century, Inc." }, + { 0xF8, "FIDELIX" }, + { 0x79, "Red Digital Cinema" }, + { 0x7A, "Densbits Technology" }, + { 0xFB, "Zempro" }, + { 0x7C, "MoSys" }, + { 0xFD, "Provigent" }, + { 0xFE, "Triad Semiconductor, Inc." }, + { 0x00, NULL }, +}; + +const struct valstr jedec_id8_vals[] = { + { 0x01, "Siklu Communication Ltd." }, + { 0x02, "A Force Manufacturing Ltd." }, + { 0x83, "Strontium" }, + { 0x04, "Abilis Systems" }, + { 0x85, "Siglead, Inc." }, + { 0x86, "Ubicom, Inc." }, + { 0x07, "Unifosa Corporation" }, + { 0x08, "Stretch, Inc." }, + { 0x89, "Lantiq Deutschland GmbH" }, + { 0x8A, "Visipro." }, + { 0x0B, "EKMemory" }, + { 0x8C, "Microelectronics Institute ZTE" }, + { 0x0D, "Cognovo Ltd." }, + { 0x0E, "Carry Technology Co. Ltd." }, + { 0x8F, "Nokia" }, + { 0x10, "King Tiger Technology" }, + { 0x91, "Sierra Wireless" }, + { 0x92, "HT Micron" }, + { 0x13, "Albatron Technology Co. Ltd." }, + { 0x94, "Leica Geosystems AG" }, + { 0x15, "BroadLight" }, + { 0x16, "AEXEA" }, + { 0x97, "ClariPhy Communications, Inc." }, + { 0x98, "Green Plug" }, + { 0x19, "Design Art Networks" }, + { 0x1A, "Mach Xtreme Technology Ltd." }, + { 0x9B, "ATO Solutions Co. Ltd." }, + { 0x1C, "Ramsta" }, + { 0x9D, "Greenliant Systems, Ltd." }, + { 0x9E, "Teikon" }, + { 0x1F, "Antec Hadron" }, + { 0x20, "NavCom Technology, Inc." }, + { 0xA1, "Shanghai Fudan Microelectronics" }, + { 0xA2, "Calxeda, Inc." }, + { 0x23, "JSC EDC Electronics" }, + { 0xA4, "Kandit Technology Co. Ltd." }, + { 0x25, "Ramos Technology" }, + { 0x26, "Goldenmars Technology" }, + { 0xA7, "XeL Technology Inc." }, + { 0xA8, "Newzone Corporation" }, + { 0x29, "ShenZhen MercyPower Tech" }, + { 0x2A, "Nanjing Yihuo Technology" }, + { 0xAB, "Nethra Imaging Inc." }, + { 0x2C, "SiTel Semiconductor BV" }, + { 0xAD, "SolidGear Corporation" }, + { 0xAE, "Topower Computer Ind Co Ltd." }, + { 0x2F, "Wilocity" }, + { 0xB0, "Profichip GmbH" }, + { 0x31, "Gerad Technologies" }, + { 0x32, "Ritek Corporation" }, + { 0xB3, "Gomos Technology Limited" }, + { 0x34, "Memoright Corporation" }, + { 0xB5, "D-Broad, Inc." }, + { 0xB6, "HiSilicon Technologies" }, + { 0x37, "Syndiant Inc.." }, + { 0x38, "Enverv Inc." }, + { 0xB9, "Cognex" }, + { 0xBA, "Xinnova Technology Inc." }, + { 0x3B, "Ultron AG" }, + { 0xBC, "Concord Idea Corporation" }, + { 0x3D, "AIM Corporation" }, + { 0x3E, "Lifetime Memory Products" }, + { 0xBF, "Ramsway" }, + { 0x40, "Recore Systems B.V." }, + { 0xC1, "Haotian Jinshibo Science Tech" }, + { 0xC2, "Being Advanced Memory" }, + { 0x43, "Adesto Technologies" }, + { 0xC4, "Giantec Semiconductor, Inc." }, + { 0x45, "HMD Electronics AG" }, + { 0x46, "Gloway International (HK)" }, + { 0xC7, "Kingcore" }, + { 0xC8, "Anucell Technology Holding" }, + { 0x49, "Accord Software & Systems Pvt. Ltd." }, + { 0x4A, "Active-Semi Inc." }, + { 0xCB, "Denso Corporation" }, + { 0x4C, "TLSI Inc." }, + { 0xCD, "Qidan" }, + { 0xCE, "Mustang" }, + { 0x4F, "Orca Systems" }, + { 0xD0, "Passif Semiconductor" }, + { 0x51, "GigaDevice Semiconductor (Beijing) Inc." }, + { 0x52, "Memphis Electronic" }, + { 0xD3, "Beckhoff Automation GmbH" }, + { 0x54, "Harmony Semiconductor Corp" }, + { 0xD5, "Air Computers SRL" }, + { 0xD6, "TMT Memory" }, + { 0x57, "Eorex Corporation" }, + { 0x58, "Xingtera" }, + { 0xD9, "Netsol" }, + { 0xDA, "Bestdon Technology Co. Ltd." }, + { 0x5B, "Baysand Inc." }, + { 0xDC, "Uroad Technology Co. Ltd." }, + { 0x5D, "Wilk Elektronik S.A." }, + { 0x5E, "AAI" }, + { 0xDF, "Harman" }, + { 0xE0, "Berg Microelectronics Inc." }, + { 0x61, "ASSIA, Inc." }, + { 0x62, "Visiontek Products LLC" }, + { 0xE3, "OCMEMORY" }, + { 0x64, "Welink Solution Inc." }, + { 0xE5, "Shark Gaming" }, + { 0xE6, "Avalanche Technology" }, + { 0x67, "R&D Center ELVEES OJSC" }, + { 0x68, "KingboMars Technology Co. Ltd." }, + { 0xE9, "High Bridge Solutions Industria Eletronica" }, + { 0xEA, "Transcend Technology Co. Ltd." }, + { 0x6B, "Everspin Technologies" }, + { 0xEC, "Hon-Hai Precision" }, + { 0x6D, "Smart Storage Systems" }, + { 0x6E, "Toumaz Group" }, + { 0xEF, "Zentel Electronics Corporation" }, + { 0x70, "Panram International Corporation" }, + { 0xF1, "Silicon Space Technology" }, + { 0xF2, "LITE-ON IT Corporation" }, + { 0x73, "Inuitive" }, + { 0xF4, "HMicro" }, + { 0x75, "BittWare, Inc." }, + { 0x76, "GLOBALFOUNDRIES" }, + { 0xF7, "ACPI Digital Co. Ltd." }, + { 0xF8, "Annapurna Labs" }, + { 0x79, "AcSiP Technology Corporation" }, + { 0x7A, "Idea! Electronic Systems" }, + { 0xFB, "Gowe Technology Co. Ltd." }, + { 0x7C, "Hermes Testing Solutions, Inc." }, + { 0xFD, "Positivo BGH" }, + { 0xFE, "Intelligence Silicon Technology" }, + { 0x00, NULL }, +}; + +const struct valstr jedec_id9_vals[] = { + { 0x01, "3D PLUS" }, + { 0x02, "Diehl Aerospace" }, + { 0x83, "Fairchild" }, + { 0x04, "Mercury Systems" }, + { 0x85, "Sonics, Inc." }, + { 0x86, "GE Intelligent Platforms GmbH & Co." }, + { 0x07, "Shenzhen Jinge Information Co. Ltd." }, + { 0x08, "SCWW" }, + { 0x89, "Silicon Motion Inc." }, + { 0x8A, "Anurag" }, + { 0x0B, "King Kong" }, + { 0x8C, "FROM30 Co. Ltd." }, + { 0x0D, "Gowin Semiconductor Corp" }, + { 0x0E, "Fremont Micro Devices Ltd." }, + { 0x8F, "Ericsson Modems" }, + { 0x10, "Exelis" }, + { 0x91, "Satixfy Ltd." }, + { 0x92, "Galaxy Microsystems Ltd." }, + { 0x13, "Gloway International Co. Ltd." }, + { 0x94, "Lab" }, + { 0x15, "Smart Energy Instruments" }, + { 0x16, "Approved Memory Corporation" }, + { 0x97, "Axell Corporation" }, + { 0x98, "Essencore Limited" }, + { 0x19, "Phytium" }, + { 0x1A, "Xi’an SinoChip Semiconductor" }, + { 0x9B, "Ambiq Micro" }, + { 0x1C, "eveRAM Technology, Inc." }, + { 0x9D, "Infomax" }, + { 0x9E, "Butterfly Network, Inc." }, + { 0x1F, "Shenzhen City Gcai Electronics" }, + { 0x20, "Stack Devices Corporation" }, + { 0xA1, "ADK Media Group" }, + { 0xA2, "TSP Global Co., Ltd." }, + { 0x23, "HighX" }, + { 0xA4, "Shenzhen Elicks Technology" }, + { 0x25, "ISSI/Chingis" }, + { 0x26, "Google, Inc." }, + { 0xA7, "Dasima International Development" }, + { 0xA8, "Leahkinn Technology Limited" }, + { 0x29, "HIMA Paul Hildebrandt GmbH Co KG" }, + { 0x2A, "Keysight Technologies" }, + { 0xAB, "Techcomp International (Fastable)" }, + { 0x2C, "Ancore Technology Corporation" }, + { 0xAD, "Nuvoton" }, + { 0xAE, "Korea Uhbele International Group Ltd." }, + { 0x2F, "Ikegami Tsushinki Co Ltd." }, + { 0xB0, "RelChip, Inc." }, + { 0x31, "Baikal Electronics" }, + { 0x32, "Nemostech Inc." }, + { 0xB3, "Memorysolution GmbH" }, + { 0x34, "Silicon Integrated Systems Corporation" }, + { 0xB5, "Xiede" }, + { 0xB6, "Multilaser Components" }, + { 0x37, "Flash Chi" }, + { 0x38, "Jone" }, + { 0xB9, "GCT Semiconductor Inc." }, + { 0xBA, "Hong Kong Zetta Device Technology" }, + { 0x3B, "Unimemory Technology(s) Pte Ltd." }, + { 0xBC, "Cuso" }, + { 0x3D, "Kuso" }, + { 0x3E, "Uniquify Inc." }, + { 0xBF, "Skymedi Corporation" }, + { 0x40, "Core Chance Co. Ltd." }, + { 0xC1, "Tekism Co. Ltd." }, + { 0xC2, "Seagate Technology PLC" }, + { 0x43, "Hong Kong Gaia Group Co. Limited" }, + { 0xC4, "Gigacom Semiconductor LLC" }, + { 0x45, "V2 Technologies" }, + { 0x46, "TLi" }, + { 0xC7, "Neotion" }, + { 0xC8, "Lenovo" }, + { 0x49, "Shenzhen Zhongteng Electronic Corp. Ltd." }, + { 0x4A, "Compound Photonics" }, + { 0xCB, "in2H2 inc" }, + { 0x4C, "Shenzhen Pango Microsystems Co. Ltd" }, + { 0xCD, "Vasekey" }, + { 0xCE, "Cal-Comp Industria de Semicondutores" }, + { 0x4F, "Eyenix Co., Ltd." }, + { 0xD0, "Heoriady" }, + { 0x51, "Accelerated Memory Production Inc." }, + { 0x52, "INVECAS, Inc." }, + { 0xD3, "AP Memory" }, + { 0x54, "Douqi Technology" }, + { 0xD5, "Etron Technology, Inc." }, + { 0xD6, "Indie Semiconductor" }, + { 0x57, "Socionext Inc." }, + { 0x58, "HGST" }, + { 0xD9, "EVGA" }, + { 0xDA, "Audience Inc." }, + { 0x5B, "EpicGear" }, + { 0xDC, "Vitesse Enterprise Co." }, + { 0x5D, "Foxtronn International Corporation" }, + { 0x5E, "Bretelon Inc." }, + { 0xDF, "Zbit Semiconductor, Inc." }, + { 0xE0, "Eoplex Inc" }, + { 0x61, "MaxLinear, Inc." }, + { 0x62, "ETA Devices" }, + { 0xE3, "LOKI" }, + { 0x64, "IMS Semiconductor Co., Ltd" }, + { 0xE5, "Dosilicon Co., Ltd." }, + { 0xE6, "Dolphin Integration" }, + { 0x67, "Shenzhen Mic Electronics Technology" }, + { 0x68, "Boya Microelectronics Inc." }, + { 0xE9, "Geniachip (Roche)" }, + { 0xEA, "Axign" }, + { 0x6B, "Kingred Electronic Technology Ltd." }, + { 0xEC, "Chao Yue Zhuo Computer Business Dept." }, + { 0x6D, "Guangzhou Si Nuo Electronic Technology." }, { 0x00, NULL }, }; @@ -842,6 +1396,22 @@ ipmi_spd_print(uint8_t *spd_data, int len) printf("%s\n", val2str(spd_data[118], jedec_id5_vals)); break; + case 5: + printf("%s\n", val2str(spd_data[118], jedec_id6_vals)); + break; + + case 6: + printf("%s\n", val2str(spd_data[118], jedec_id7_vals)); + break; + + case 7: + printf("%s\n", val2str(spd_data[118], jedec_id8_vals)); + break; + + case 8: + printf("%s\n", val2str(spd_data[118], jedec_id9_vals)); + break; + default: printf("%s\n", "JEDEC JEP106 update required" ); @@ -928,6 +1498,22 @@ ipmi_spd_print(uint8_t *spd_data, int len) printf("%s\n", val2str(spd_data[321], jedec_id5_vals)); break; + case 5: + printf("%s\n", val2str(spd_data[321], jedec_id6_vals)); + break; + + case 6: + printf("%s\n", val2str(spd_data[321], jedec_id7_vals)); + break; + + case 7: + printf("%s\n", val2str(spd_data[321], jedec_id8_vals)); + break; + + case 8: + printf("%s\n", val2str(spd_data[321], jedec_id9_vals)); + break; + default: printf("%s\n", "JEDEC JEP106 update required"); @@ -983,12 +1569,30 @@ ipmi_spd_print(uint8_t *spd_data, int len) else { if (spd_data[67] != 0x7f) printf("%s\n", - val2str(spd_data[67], - jedec_id4_vals)); - else - printf("%s\n", - val2str(spd_data[68], - jedec_id5_vals)); + val2str(spd_data[67], jedec_id4_vals)); + else { + if (spd_data[68] != 0x7f) + printf("%s\n", + val2str(spd_data[68], jedec_id5_vals)); + else { + if (spd_data[69] != 0x7f) + printf("%s\n", + val2str(spd_data[69], jedec_id6_vals)); + else { + if (spd_data[70] != 0x7f) + printf("%s\n", + val2str(spd_data[70], jedec_id7_vals)); + else { + if (spd_data[71] != 0x7f) + printf("%s\n", + val2str(spd_data[71], jedec_id8_vals)); + else + printf("%s\n", + val2str(spd_data[72], jedec_id9_vals)); + } + } + } + } } } } diff --git a/lib/helper.c b/lib/helper.c index b9316c4..022a9c9 100644 --- a/lib/helper.c +++ b/lib/helper.c @@ -30,6 +30,11 @@ * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. */ #define _POSIX_SOURCE +#define /* glibc 2.19 and earlier */ _BSD_SOURCE || \ + /* Since glibc 2.20 */_DEFAULT_SOURCE || \ + _XOPEN_SOURCE >= 500 || \ + _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED || \ + /* Since glibc 2.10: */ _POSIX_C_SOURCE >= 200112L \ #include <sys/types.h> #include <sys/stat.h> @@ -36,6 +36,12 @@ #include <ipmitool/log.h> #include <ipmitool/bswap.h> +/* From src/plugins/ipmi_intf.c: */ +void +ipmi_intf_set_max_request_data_size(struct ipmi_intf * intf, uint16_t size); +void +ipmi_intf_set_max_response_data_size(struct ipmi_intf * intf, uint16_t size); + #if HAVE_PRAGMA_PACK # pragma pack(push, 1) #endif @@ -128,7 +134,7 @@ int hpm2_get_capabilities(struct ipmi_intf * intf, #endif /* check HPM.2 revision */ - if (caps->hpm2_revision_id != HPM2_REVISION) { + if (caps->hpm2_revision_id == 0) { lprintf(LOG_NOTICE, "Bad HPM.2 revision, rev=%d", caps->hpm2_revision_id); return -1; diff --git a/lib/ipmi_chassis.c b/lib/ipmi_chassis.c index d4e88ee..fb7c27d 100644 --- a/lib/ipmi_chassis.c +++ b/lib/ipmi_chassis.c @@ -29,6 +29,8 @@ * LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. */ +#define _SVID_SOURCE || _BSD_SOURCE || _POSIX_C_SOURCE >= 1 || \ + _XOPEN_SOURCE || _POSIX_SOURCE #include <stdlib.h> #include <string.h> @@ -110,12 +112,6 @@ ipmi_chassis_power_control(struct ipmi_intf * intf, uint8_t ctl) printf("Chassis Power Control: %s\n", val2str(ctl, ipmi_chassis_power_control_vals)); - -#if 0 /* this can cause sessions to hang around after power commands */ - /* sessions often get lost when changing chassis power */ - intf->abort = 1; -#endif - return 0; } diff --git a/lib/ipmi_dcmi.c b/lib/ipmi_dcmi.c index aeee944..2cfe48f 100755 --- a/lib/ipmi_dcmi.c +++ b/lib/ipmi_dcmi.c @@ -36,6 +36,7 @@ * This code conforms to the 1.0 DCMI Specification * released by Hari Ramachandran of the Intel Corporation */ +#define _BSD_SOURCE #include <stdlib.h> #include <string.h> @@ -671,7 +672,7 @@ chk_nm_rsp(struct ipmi_rs * rsp) * some issue and cannot complete the command */ if (rsp == NULL) { - lprintf(LOG_ERR, "\n No reponse to NM request"); + lprintf(LOG_ERR, "\n No response to NM request"); return 1; } /* if the completion code is greater than zero there was an error. We'll @@ -1426,7 +1427,7 @@ ipmi_dcmi_getthermalpolicy(struct ipmi_intf * intf, uint8_t entityID, /* rsp->data[0] is equal to response data byte 2 in spec */ memcpy(&val, rsp->data, sizeof (val)); printf("\n"); - printf(" Persistance flag is: %s\n", + printf(" Persistence flag is: %s\n", ((val.exceptionActions & 0x80) ? "set" : "notset")); printf(" Exception Actions, taken if the Temperature Limit exceeded:\n"); printf(" Hard Power Off system and log event: %s\n", @@ -1768,16 +1769,6 @@ ipmi_dcmi_pwr_slimit(struct ipmi_intf * intf, const char * option, uint32_t lvalue = 0; rsp = ipmi_dcmi_pwr_glimit(intf); /* get the power limit settings */ -# if 0 - { - unsigned char counter = 0; - printf("DATA (%d): ", rsp->data_len); - for(counter = 0; counter < rsp->data_len; counter ++) { - printf("%02X ", rsp->data[counter]); - } - printf("\n"); - } -# endif /* rsp can be a null so check response before any operation on it to * avoid sig segv */ @@ -3163,7 +3154,7 @@ ipmi_nm_thresh(struct ipmi_intf * intf, int argc, char **argv) return -1; } if (str2ushort(argv[0], &thresh.thresholds[i++]) < 0) { - lprintf(LOG_ERR,"threshold value %d count must be a positve integer.\n", i); + lprintf(LOG_ERR,"threshold value %d count must be a positive integer.\n", i); return -1; } default: diff --git a/lib/ipmi_delloem.c b/lib/ipmi_delloem.c index 2214c99..9bb0885 100644 --- a/lib/ipmi_delloem.c +++ b/lib/ipmi_delloem.c @@ -251,6 +251,9 @@ static int ipmi_setled_state(struct ipmi_intf *intf, int bayId, int slotId, int state); static int ipmi_getdrivemap(struct ipmi_intf *intf, int b, int d, int f, int *bayId, int *slotId); +static int +get_nic_selection_mode_12g(struct ipmi_intf* intf,int current_arg, + char ** argv, char *nic_set); /* Function Name: ipmi_delloem_main * @@ -2051,7 +2054,7 @@ IsLANSupported() return 1; } -int +static int get_nic_selection_mode_12g(struct ipmi_intf* intf,int current_arg, char ** argv, char *nic_set) { @@ -2783,8 +2786,6 @@ ipmi_set_power_capstatus_command(struct ipmi_intf * intf, uint8_t val) static int ipmi_powermgmt(struct ipmi_intf * intf) { - time_t now; - struct tm* tm; struct ipmi_rs * rsp; struct ipmi_rq req; uint8_t msg_data[2]; @@ -2811,9 +2812,6 @@ ipmi_powermgmt(struct ipmi_intf * intf) int remainder; int wattReading; - now = time(0); - tm = gmtime(&now); - memset(&req, 0, sizeof(req)); req.msg.netfn = IPMI_NETFN_STORAGE; req.msg.lun = 0; @@ -2893,7 +2891,6 @@ ipmi_powermgmt(struct ipmi_intf * intf) ipmi_time_to_str(ampPeakTimeConv, ampPeakTime); ipmi_time_to_str(wattPeakTimeConv, wattPeakTime); ipmi_time_to_str(bmctimeconv, bmctime); - now = time(0); remainder = (cumReadingConv % 1000); cumReadingConv = cumReadingConv / 1000; @@ -3645,7 +3642,6 @@ ipmi_set_power_cap(struct ipmi_intf * intf, int unit, int val) uint8_t data[13], *rdata; uint16_t powercapval; uint64_t maxpowerbtuphr; - uint64_t maxpowerbtuphr1; uint64_t minpowerbtuphr; IPMI_POWER_CAP ipmipowercap; @@ -3733,11 +3729,10 @@ ipmi_set_power_cap(struct ipmi_intf * intf, int unit, int val) || (val > ipmipowercap.MaximumPowerConsmp)) && (unit == btuphr)) { minpowerbtuphr = watt_to_btuphr_conversion(ipmipowercap.MinimumPowerConsmp); maxpowerbtuphr = watt_to_btuphr_conversion(ipmipowercap.MaximumPowerConsmp); - maxpowerbtuphr1 = watt_to_btuphr_conversion(ipmipowercap.MaximumPowerConsmp); lprintf(LOG_ERR, "Cap value is out of boundary conditon it should be between %d", minpowerbtuphr); - lprintf(LOG_ERR, " -%d", maxpowerbtuphr1); + lprintf(LOG_ERR, " -%d", maxpowerbtuphr); return -1; } rc = ipmi_mc_setsysinfo(intf, 13, data); diff --git a/lib/ipmi_ekanalyzer.c b/lib/ipmi_ekanalyzer.c index afee48b..d6ce4c7 100644 --- a/lib/ipmi_ekanalyzer.c +++ b/lib/ipmi_ekanalyzer.c @@ -458,7 +458,6 @@ ipmi_ekanalyzer_main(struct ipmi_intf *intf, int argc, char **argv) { int rc = ERROR_STATUS; int file_type[MAX_FILE_NUMBER]; - int tmp_ret = 0; char *filename[MAX_FILE_NUMBER]; unsigned int argument_offset = 0; unsigned int type_offset = 0; @@ -508,7 +507,7 @@ ipmi_ekanalyzer_main(struct ipmi_intf *intf, int argc, char **argv) rc = ipmi_ek_display_fru_header (filename[type_offset]); if (rc != ERROR_STATUS) { /* Display FRU header info in detail record */ - tmp_ret = ipmi_ek_display_fru_header_detail(filename[type_offset]); + rc = ipmi_ek_display_fru_header_detail(filename[type_offset]); /* Convert from binary data into multi record structure */ rc = ipmi_ekanalyzer_fru_file2structure (filename[type_offset], &list_head, &list_record, &list_last ); @@ -2425,7 +2424,7 @@ ipmi_ek_display_fru_header_detail(char *filename) return (-1); } /*** Display FRU Internal Use Info ***/ - if (!feof(input_file)) { + if (header.offset.internal != 0) { unsigned char format_version; unsigned long len = 0; @@ -2868,7 +2867,6 @@ ipmi_ek_display_product_info_area(FILE *input_file, long offset) return (-1); } - fread(&data, 1, 1, input_file); printf("Language Code: %d\n", data); len--; /* Product Mfg */ diff --git a/lib/ipmi_event.c b/lib/ipmi_event.c index 2f1032e..16fc80d 100644 --- a/lib/ipmi_event.c +++ b/lib/ipmi_event.c @@ -29,6 +29,7 @@ * LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. */ +#define _BSD_SOURCE #include <stdlib.h> #include <stdio.h> diff --git a/lib/ipmi_fru.c b/lib/ipmi_fru.c index 40f98e7..5c94b08 100644 --- a/lib/ipmi_fru.c +++ b/lib/ipmi_fru.c @@ -50,6 +50,16 @@ #define FRU_MULTIREC_CHUNK_SIZE (255 + sizeof(struct fru_multirec_header)) +/* From lib/dimm_spd.c: */ +int +ipmi_spd_print_fru(struct ipmi_intf * intf, uint8_t id); + +/* From src/plugins/ipmi_intf.c: */ +void +ipmi_intf_set_max_request_data_size(struct ipmi_intf * intf, uint16_t size); +void +ipmi_intf_set_max_response_data_size(struct ipmi_intf * intf, uint16_t size); + extern int verbose; static void ipmi_fru_read_to_bin(struct ipmi_intf * intf, char * pFileName, uint8_t fruId); @@ -810,12 +820,11 @@ fru_area_print_multirec_bloc(struct ipmi_intf * intf, struct fru_info * fru, uint8_t id, uint32_t offset) { uint8_t * fru_data = NULL; - uint32_t fru_len, i; + uint32_t i; struct fru_multirec_header * h; uint32_t last_off, len; i = last_off = offset; - fru_len = 0; fru_data = malloc(fru->size + 1); if (fru_data == NULL) { @@ -1592,7 +1601,6 @@ static void ipmi_fru_oemkontron_get( int argc, char ** argv,uint8_t * fru_data, printf("Kontron OEM Information Record\n"); version = oh->record_version; - int blockstart; uint8_t blockCount; uint8_t blockIndex=0; @@ -1613,7 +1621,6 @@ static void ipmi_fru_oemkontron_get( int argc, char ** argv,uint8_t * fru_data, void * pRecordData; uint8_t nameLen; - blockstart = offset; nameLen = ( fru_data[offset++] &= 0x3F ); printf(" Name: %*.*s\n",nameLen, nameLen, (const char *)(fru_data+offset)); @@ -1743,7 +1750,6 @@ static int ipmi_fru_oemkontron_edit( int argc, char ** argv,uint8_t * fru_data, version = oh->record_version; if( version == formatVersion ){ - int blockstart; uint8_t blockCount; uint8_t blockIndex=0; @@ -1765,8 +1771,6 @@ static int ipmi_fru_oemkontron_edit( int argc, char ** argv,uint8_t * fru_data, void * pRecordData; uint8_t nameLen; - blockstart = offset; - nameLen = ( fru_data[offset++] & 0x3F ); if( version == 0 || version == 1 ) @@ -3357,6 +3361,9 @@ ipmi_fru_edit_multirec(struct ipmi_intf * intf, uint8_t id , retStatus = ipmi_fru_get_multirec_location_from_fru(intf, id, &fruInfo, &offFruMultiRec, &fruMultiRecSize); + if (retStatus != 0) { + return retStatus; + } lprintf(LOG_DEBUG, "FRU Size : %lu\n", fruMultiRecSize); @@ -3406,14 +3413,13 @@ ipmi_fru_edit_multirec(struct ipmi_intf * intf, uint8_t id , { uint8_t * fru_data; - uint32_t fru_len, i; + uint32_t i; uint32_t offset= offFruMultiRec; struct fru_multirec_header * h; uint32_t last_off, len; uint8_t error=0; i = last_off = offset; - fru_len = 0; memset(&fru, 0, sizeof(fru)); fru_data = malloc(fru.size + 1); @@ -3560,6 +3566,9 @@ ipmi_fru_get_multirec(struct ipmi_intf * intf, uint8_t id , retStatus = ipmi_fru_get_multirec_location_from_fru(intf, id, &fruInfo, &offFruMultiRec, &fruMultiRecSize); + if (retStatus != 0) { + return retStatus; + } lprintf(LOG_DEBUG, "FRU Size : %lu\n", fruMultiRecSize); @@ -3609,14 +3618,13 @@ ipmi_fru_get_multirec(struct ipmi_intf * intf, uint8_t id , { uint8_t * fru_data; - uint32_t fru_len, i; + uint32_t i; uint32_t offset= offFruMultiRec; struct fru_multirec_header * h; uint32_t last_off, len; uint8_t error=0; i = last_off = offset; - fru_len = 0; fru_data = malloc(fru.size + 1); if (fru_data == NULL) { @@ -4851,7 +4859,7 @@ ipmi_fru_set_field_string_rebuild(struct ipmi_intf * intf, uint8_t fruId, uint8_t *fru_data_new = NULL; uint8_t *fru_area = NULL; uint32_t fru_field_offset, fru_field_offset_tmp; - uint32_t fru_section_len, old_section_len, header_offset; + uint32_t fru_section_len, header_offset; uint32_t chassis_offset, board_offset, product_offset; uint32_t chassis_len, board_len, product_len, product_len_new; int num_byte_change = 0, padding_len = 0; @@ -4925,9 +4933,6 @@ ipmi_fru_set_field_string_rebuild(struct ipmi_intf * intf, uint8_t fruId, goto ipmi_fru_set_field_string_rebuild_out; } - /* Keep length for future old section display */ - old_section_len = fru_section_len; - /************************* 3) Seek to field index */ for (i = 0;i <= f_index; i++) { @@ -5042,6 +5047,11 @@ ipmi_fru_set_field_string_rebuild(struct ipmi_intf * intf, uint8_t fruId, header.offset.product += change_size_by_8; } + if ((f_type == 'c' ) || (f_type == 'b' ) || (f_type == 'p' )) { + printf("Change multi offset from %d to %d\n", header.offset.multi, header.offset.multi + change_size_by_8); + header.offset.multi += change_size_by_8; + } + /* Adjust length of the section */ if (f_type == 'c') { @@ -5141,31 +5151,6 @@ ipmi_fru_set_field_string_rebuild(struct ipmi_intf * intf, uint8_t fruId, #ifdef DBG_RESIZE_FRU printf("Calculate New Checksum: %x\n", (0 - cksum)); #endif - - /****** ENABLE to show section modified before and after ********/ - #if 0 - printf("Section: "); - for( counter = 0; counter <old_section_len; counter ++ ) - { - if((counter %16) == 0) - { - printf("\n"); - } - printf( "%02X ", *(fru_data_old + header_offset + counter) ); - } - printf("\n"); - - printf("Section: "); - for( counter = 0; counter <fru_section_len; counter ++ ) - { - if((counter %16) == 0) - { - printf("\n"); - } - printf( "%02X ", *(fru_data_new + header_offset + counter) ); - } - printf("\n"); - #endif } else { diff --git a/lib/ipmi_hpmfwupg.c b/lib/ipmi_hpmfwupg.c index 8ada69b..9cbd4ff 100644 --- a/lib/ipmi_hpmfwupg.c +++ b/lib/ipmi_hpmfwupg.c @@ -30,6 +30,10 @@ * LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. */ +#define _BSD_SOURCE || \ + (_XOPEN_SOURCE >= 500 || \ + _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED) && \ + !(_POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700) #include <ipmitool/ipmi_intf.h> #include <ipmitool/ipmi_mc.h> @@ -38,14 +42,20 @@ #include <ipmitool/ipmi_strings.h> #include <ipmitool/log.h> #include "../src/plugins/lan/md5.h" +#include <ctype.h> #include <stdio.h> #include <time.h> #include <sys/param.h> +#include <unistd.h> #if HAVE_CONFIG_H # include <config.h> #endif +/* From src/plugins/ipmi_intf.c: */ +uint16_t +ipmi_intf_get_max_request_data_size(struct ipmi_intf * intf); + extern int verbose; int HpmfwupgUpgrade(struct ipmi_intf *intf, char *imageFilename, @@ -106,6 +116,10 @@ int HpmFwupgActionUploadFirmware(struct HpmfwupgComponentBitMask components, struct ipmi_intf *intf, int option, int *pFlagColdReset); +int +HpmfwupgPreUpgradeCheck(struct ipmi_intf *intf, + struct HpmfwupgUpgradeCtx *pFwupgCtx, + int componentMask, int option); /* HpmGetuserInput - get input from user * @@ -294,7 +308,6 @@ HpmfwupgTargetCheck(struct ipmi_intf *intf, int option) struct HpmfwupgGetTargetUpgCapabilitiesCtx targetCapCmd; int rc = HPMFWUPG_SUCCESS; int componentId = 0; - int flagColdReset = FALSE; struct ipm_devid_rsp devIdrsp; struct HpmfwupgGetComponentPropertiesCtx getCompProp; int mode = 0; @@ -431,13 +444,6 @@ HpmfwupgTargetCheck(struct ipmi_intf *intf, int option) gVersionInfo[componentId].deferredAux[2] = 0xff; gVersionInfo[componentId].deferredAux[3] = 0xff; } - if (gVersionInfo[componentId].coldResetRequired) { - /* - * If any of the component indicates that the Payload Cold reset is required - * then set the flag - */ - flagColdReset = TRUE; - } if (option & VIEW_MODE) { HpmDisplayVersion(mode, &gVersionInfo[componentId], @@ -996,14 +1002,11 @@ HpmfwupgUpgradeStage(struct ipmi_intf *intf, struct HpmfwupgActionRecord* pActionRecord; int rc = HPMFWUPG_SUCCESS; unsigned char *pImagePtr; - unsigned int actionsSize; int flagColdReset = FALSE; /* Put pointer after image header */ pImagePtr = (unsigned char*) (pFwupgCtx->pImageData + sizeof(struct HpmfwupgImageHeader) + pImageHeader->oemDataLength + sizeof(unsigned char)/*checksum*/); - /* Deternime actions size */ - actionsSize = pFwupgCtx->imageSize - sizeof(struct HpmfwupgImageHeader); if (!(option & VIEW_MODE)) { HpmDisplayUpgradeHeader(); } @@ -2021,13 +2024,13 @@ HpmfwupgQueryRollbackStatus(struct ipmi_intf *intf, memcpy(&pCtx->resp, rsp->data, sizeof(struct HpmfwupgQueryRollbackStatusResp)); if (pCtx->resp.rollbackComp.ComponentBits.byte != 0) { - /* Rollback occured */ + /* Rollback occurred */ lprintf(LOG_NOTICE, - "Rollback occured on component mask: 0x%02x", + "Rollback occurred on component mask: 0x%02x", pCtx->resp.rollbackComp.ComponentBits.byte); } else { lprintf(LOG_NOTICE, - "No Firmware rollback occured"); + "No Firmware rollback occurred"); } } else if (rsp->ccode == 0x81) { lprintf(LOG_ERR, diff --git a/lib/ipmi_ime.c b/lib/ipmi_ime.c index f8e8c09..6bdca3b 100755 --- a/lib/ipmi_ime.c +++ b/lib/ipmi_ime.c @@ -430,11 +430,9 @@ static int ImeUpgrade(struct ipmi_intf *intf, char* imageFilename) if(currentPercent != shownPercent) { - uint16_t timeElapsedSecond; shownPercent = currentPercent; printf("Percent: %02i, ", shownPercent); time(¤t); - timeElapsedSecond = (current-start) + ((current-start)%60); printf("Elapsed time %02ld:%02ld\r",((current-start)/60), ((current-start)%60)); fflush(stdout); diff --git a/lib/ipmi_isol.c b/lib/ipmi_isol.c index 84d7db8..bc0b08b 100644 --- a/lib/ipmi_isol.c +++ b/lib/ipmi_isol.c @@ -29,6 +29,7 @@ * LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. */ +#define _XOPEN_SOURCE #include <stdlib.h> #include <string.h> diff --git a/lib/ipmi_main.c b/lib/ipmi_main.c index a752b59..e6f96f6 100644 --- a/lib/ipmi_main.c +++ b/lib/ipmi_main.c @@ -30,6 +30,10 @@ * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. */ #define _XOPEN_SOURCE 700 +#define _BSD_SOURCE || \ + (_XOPEN_SOURCE >= 500 || \ + _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED) && \ + !(_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) #include <stdlib.h> #include <stdio.h> @@ -69,6 +73,8 @@ #include <ipmitool/ipmi_oem.h> #include <ipmitool/ipmi_ekanalyzer.h> #include <ipmitool/ipmi_picmg.h> +#include <ipmitool/ipmi_kontronoem.h> +#include <ipmitool/ipmi_vita.h> #ifdef HAVE_CONFIG_H # include <config.h> @@ -80,6 +86,10 @@ # define OPTION_STRING "I:46hVvcH:f:U:p:d:S:D:" #endif +/* From src/plugins/ipmi_intf.c: */ +void +ipmi_intf_set_max_request_data_size(struct ipmi_intf * intf, uint16_t size); + extern int verbose; extern int csv_output; extern const struct valstr ipmi_privlvl_vals[]; @@ -332,7 +342,7 @@ ipmi_parse_hex(const char *str) else /* it's A-F or a-f */ b = (*p | 0x20) - 'a' + 10; /* convert to lowercase and to 10-15 */ - *q = *q + b << shift; + *q = *q + (b << shift); if (shift) shift = 0; else { diff --git a/lib/ipmi_mc.c b/lib/ipmi_mc.c index a93134e..5b4a080 100644 --- a/lib/ipmi_mc.c +++ b/lib/ipmi_mc.c @@ -779,7 +779,7 @@ ipmi_mc_rst_watchdog(struct ipmi_intf * intf) if (rsp->ccode) { lprintf(LOG_ERR, "Reset Watchdog Timer command failed: %s", (rsp->ccode == IPM_WATCHDOG_RESET_ERROR) ? - "Attempt to reset unitialized watchdog" : + "Attempt to reset uninitialized watchdog" : val2str(rsp->ccode, completion_code_vals)); return -1; } diff --git a/lib/ipmi_pef.c b/lib/ipmi_pef.c index 1beebf0..22f29e4 100644 --- a/lib/ipmi_pef.c +++ b/lib/ipmi_pef.c @@ -267,7 +267,7 @@ ipmi_pef_print_lan_dest(struct ipmi_intf * intf, uint8_t ch, uint8_t dest) struct pef_lan_cfgparm_dest_type * ptype; struct pef_lan_cfgparm_dest_info * pinfo; char buf[32]; - uint8_t tbl_size, dsttype, timeout, retries; + uint8_t dsttype, timeout, retries; memset(&lsel, 0, sizeof(lsel)); lsel.id = PEF_LAN_CFGPARM_ID_DEST_COUNT; @@ -283,9 +283,6 @@ ipmi_pef_print_lan_dest(struct ipmi_intf * intf, uint8_t ch, uint8_t dest) "Alert destination count"); return; } - tbl_size = (rsp->data[1] & PEF_LAN_DEST_TABLE_SIZE_MASK); - //if (tbl_size == 0 || dest == 0) /* LAN alerting not supported */ - // return; lsel.id = PEF_LAN_CFGPARM_ID_DESTTYPE; lsel.set = dest; diff --git a/lib/ipmi_picmg.c b/lib/ipmi_picmg.c index f47577e..70f845d 100644 --- a/lib/ipmi_picmg.c +++ b/lib/ipmi_picmg.c @@ -1280,49 +1280,53 @@ ipmi_picmg_get_led_state(struct ipmi_intf * intf, int argc, char ** argv) } printf("LED states: %x ", rsp->data[1] ); - if (rsp->data[1] == 0x1) - printf("[LOCAL CONTROL]\n"); - else if (rsp->data[1] == 0x2) - printf("[OVERRIDE]\n"); - else if (rsp->data[1] == 0x4) - printf("[LAMPTEST]\n"); - else - printf("\n"); + + if (!(rsp->data[1] & 0x1)) { + printf("[NO LOCAL CONTROL]\n"); + return 0; + } + + printf("[LOCAL CONTROL"); + + if (rsp->data[1] & 0x2) { + printf("|OVERRIDE"); + } + + if (rsp->data[1] & 0x4) { + printf("|LAMPTEST"); + } + + printf("]\n"); printf(" Local Control function: %x ", rsp->data[2] ); - if (rsp->data[2] == 0x0) + if (rsp->data[2] == 0x0) { printf("[OFF]\n"); - else if (rsp->data[2] == 0xff) + } else if (rsp->data[2] == 0xff) { printf("[ON]\n"); - else + } else { printf("[BLINKING]\n"); + } printf(" Local Control On-Duration: %x\n", rsp->data[3] ); printf(" Local Control Color: %x [%s]\n", rsp->data[4], led_color_str[ rsp->data[4] ]); /* override state or lamp test */ - if (rsp->data[1] == 0x02) { + if (rsp->data[1] & 0x02) { printf(" Override function: %x ", rsp->data[5] ); - if (rsp->data[2] == 0x0) + if (rsp->data[2] == 0x0) { printf("[OFF]\n"); - else if (rsp->data[2] == 0xff) + } else if (rsp->data[2] == 0xff) { printf("[ON]\n"); - else + } else { printf("[BLINKING]\n"); + } printf(" Override On-Duration: %x\n", rsp->data[6] ); printf(" Override Color: %x [%s]\n", rsp->data[7], led_color_str[ rsp->data[7] ]); - }else if (rsp->data[1] == 0x06) { - printf(" Override function: %x ", rsp->data[5] ); - if (rsp->data[2] == 0x0) - printf("[OFF]\n"); - else if (rsp->data[2] == 0xff) - printf("[ON]\n"); - else - printf("[BLINKING]\n"); - printf(" Override On-Duration: %x\n", rsp->data[6] ); - printf(" Override Color: %x [%s]\n", rsp->data[7], led_color_str[ rsp->data[7] ]); + } + + if (rsp->data[1] & 0x04) { printf(" Lamp test duration: %x\n", rsp->data[8] ); } diff --git a/lib/ipmi_sdr.c b/lib/ipmi_sdr.c index 292a7d3..e3122dc 100644 --- a/lib/ipmi_sdr.c +++ b/lib/ipmi_sdr.c @@ -32,6 +32,7 @@ * LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. */ +#define _BSD_SOURCE #include <string.h> @@ -69,6 +70,10 @@ static struct ipmi_sdr_iterator *sdr_list_itr = NULL; void printf_sdr_usage(); +/* From src/plugins/ipmi_intf.c: */ +uint16_t +ipmi_intf_get_max_response_data_size(struct ipmi_intf * intf); + /* ipmi_sdr_get_unit_string - return units for base/modifier * * @pct: units are a percentage @@ -864,9 +869,11 @@ ipmi_sdr_get_header(struct ipmi_intf *intf, struct ipmi_sdr_iterator *itr) * situation, we cheat and put the original record id back in. * Otherwise, a later Get SDR Record command will fail with * completion code CBh = "Requested Sensor, data, or record - * not present" + * not present". Exception is if 'Record ID' is specified as 0000h. + * For further information see IPMI v2.0 Spec, Section 33.12 */ - if (sdr_rs.id != itr->next) { + if ((itr->next != 0x0000) && + (sdr_rs.id != itr->next)) { lprintf(LOG_DEBUG, "SDR record id mismatch: 0x%04x", sdr_rs.id); sdr_rs.id = itr->next; } diff --git a/lib/ipmi_sdradd.c b/lib/ipmi_sdradd.c index f5bf78a..52848a3 100644 --- a/lib/ipmi_sdradd.c +++ b/lib/ipmi_sdradd.c @@ -38,6 +38,7 @@ #include <stdio.h> #include <time.h> #include <fcntl.h> +#include <unistd.h> #include <ipmitool/helper.h> #include <ipmitool/log.h> diff --git a/lib/ipmi_sel.c b/lib/ipmi_sel.c index 5df66a7..b6629a2 100644 --- a/lib/ipmi_sel.c +++ b/lib/ipmi_sel.c @@ -29,8 +29,10 @@ * LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. */ +#define _BSD_SOURCE #include <string.h> +#include <strings.h> #include <math.h> #define __USE_XOPEN /* glibc2 needs this for strptime */ #include <time.h> @@ -43,6 +45,7 @@ #include <ipmitool/ipmi_mc.h> #include <ipmitool/ipmi_intf.h> #include <ipmitool/ipmi_sel.h> +#include <ipmitool/ipmi_sel_supermicro.h> #include <ipmitool/ipmi_sdr.h> #include <ipmitool/ipmi_fru.h> #include <ipmitool/ipmi_sensor.h> @@ -419,7 +422,12 @@ ipmi_sel_add_entries_fromfile(struct ipmi_intf * intf, const char * filename) memset(&sel_event, 0, sizeof(struct sel_event_record)); sel_event.record_id = 0x0000; sel_event.record_type = 0x02; - sel_event.sel_type.standard_type.gen_id = 0x00; + /* + * IPMI spec §32.1 generator ID + * Bit 0 = 1 "Software defined" + * Bit 1-7: SWID (IPMI spec §5.5), using 2 = "System management software" + */ + sel_event.sel_type.standard_type.gen_id = 0x41; sel_event.sel_type.standard_type.evm_rev = rqdata[0]; sel_event.sel_type.standard_type.sensor_type = rqdata[1]; sel_event.sel_type.standard_type.sensor_num = rqdata[2]; @@ -1461,11 +1469,14 @@ ipmi_sel_get_info(struct ipmi_intf * intf) if (rsp == NULL) { lprintf(LOG_ERR, "Get SEL Info command failed"); return -1; - } - if (rsp->ccode > 0) { + } else if (rsp->ccode > 0) { lprintf(LOG_ERR, "Get SEL Info command failed: %s", val2str(rsp->ccode, completion_code_vals)); return -1; + } else if (rsp->data_len != 14) { + lprintf(LOG_ERR, "Get SEL Info command failed: " + "Invalid data length %d", rsp->data_len); + return (-1); } if (verbose > 2) printbuf(rsp->data, rsp->data_len, "sel_info"); @@ -2731,24 +2742,26 @@ ipmi_sel_set_time(struct ipmi_intf * intf, const char * time_string) { //modify UTC time to local time expressed in number of seconds from 1/1/70 0:0:0 1970 GMT struct tm * tm_tmp = {0}; - int gt_year,gt_yday,gt_hour,lt_year,lt_yday,lt_hour; + int gt_year,gt_yday,gt_hour,gt_min,lt_year,lt_yday,lt_hour,lt_min; int delta_hour; tm_tmp=gmtime(&t); gt_year=tm_tmp->tm_year; gt_yday=tm_tmp->tm_yday; gt_hour=tm_tmp->tm_hour; + gt_min=tm_tmp->tm_min; memset(&*tm_tmp, 0, sizeof(struct tm)); tm_tmp=localtime(&t); lt_year=tm_tmp->tm_year; lt_yday=tm_tmp->tm_yday; lt_hour=tm_tmp->tm_hour; + lt_min=tm_tmp->tm_min; delta_hour=lt_hour - gt_hour; if ( (lt_year > gt_year) || ((lt_year == gt_year) && (lt_yday > gt_yday)) ) delta_hour += 24; if ( (lt_year < gt_year) || ((lt_year == gt_year) && (lt_yday < gt_yday)) ) delta_hour -= 24; - t += (delta_hour * 60 * 60); + t += (delta_hour * 60 * 60) + (lt_min - gt_min) * 60; } timei = (uint32_t)t; diff --git a/lib/ipmi_sol.c b/lib/ipmi_sol.c index 5415ea7..333ce90 100644 --- a/lib/ipmi_sol.c +++ b/lib/ipmi_sol.c @@ -29,6 +29,11 @@ * LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. */ +#define _XOPEN_SOURCE +#define _BSD_SOURCE || \ + (_XOPEN_SOURCE >= 500 || \ + _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED) && \ + !(_POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700) #include <stdlib.h> #include <string.h> @@ -92,7 +97,6 @@ static struct termios _saved_tio; static int _in_raw_mode = 0; static int _disable_keepalive = 0; static int _use_sol_for_keepalive = 0; -static int _keepalive_retries = 0; extern int verbose; diff --git a/lib/ipmi_strings.c b/lib/ipmi_strings.c index 4a1ff46..7fefee9 100644 --- a/lib/ipmi_strings.c +++ b/lib/ipmi_strings.c @@ -64,13 +64,37 @@ const struct valstr ipmi_oem_info[] = { { IPMI_OEM_TOSHIBA, "Toshiba" }, { IPMI_OEM_HITACHI_116, "Hitachi" }, { IPMI_OEM_HITACHI_399, "Hitachi" }, - { IPMI_OEM_NOKIA_SIEMENS_NETWORKS, "Nokia Siemens Networks" }, + { IPMI_OEM_NOKIA_SOLUTIONS_AND_NETWORKS, "Nokia Solutions and Networks (formerly 'Nokia Siemens Networks')" }, { IPMI_OEM_BULL, "Bull Company" }, { IPMI_OEM_PPS, "Pigeon Point Systems" }, { IPMI_OEM_BROADCOM, "Broadcom Corporation" }, { IPMI_OEM_ERICSSON, "Ericsson AB"}, { IPMI_OEM_QUANTA, "Quanta" }, { IPMI_OEM_ADVANTECH, "Advantech" }, + /************************************************************************ + * Add ID String for IANA Enterprise Number of IBM & ADLINK + * https://www.iana.org/assignments/enterprise-numbers/enterprise-numbers + * 2 + * IBM + * Kristine Adamson + * adamson&us.ibm.com + * 4769 + * IBM Corporation + * Victor Sample + * vsample&us.ibm.com + * 20301 + * IBM eServer X + * Lynn Fore + * sls&us.ibm.com + * 24339 + * ADLINK TECHNOLOGY INC. + * Ryan Hsu + * ryan.hsu&adlinktech.com + ************************************************************************/ + { IPMI_OEM_IBM_2, "IBM" }, + { IPMI_OEM_IBM_4769, "IBM Corporation" }, + { IPMI_OEM_IBM_20301, "IBM eServer X" }, + { IPMI_OEM_ADLINK_24339, "ADLINK Technology Inc." }, { 0xffff , NULL }, }; @@ -202,6 +226,62 @@ const struct oemvalstr ipmi_oem_product_info[] = { { IPMI_OEM_ADVANTECH, 0x9212, "ESP-9212" }, { IPMI_OEM_ADVANTECH, 0x6000, "CGS-6000" }, { IPMI_OEM_ADVANTECH, 0x6010, "CGS-6010" }, + /* ADLINK Technology Inc. */ + /* AdvancedTCA Processor Blades */ + { IPMI_OEM_ADLINK_24339, 0x3100, "aTCA-3100" }, + { IPMI_OEM_ADLINK_24339, 0x3110, "aTCA-3110" }, + { IPMI_OEM_ADLINK_24339, 0x3150, "aTCA-3150" }, + { IPMI_OEM_ADLINK_24339, 0x3420, "aTCA-3420" }, + { IPMI_OEM_ADLINK_24339, 0x3710, "aTCA-3710" }, + { IPMI_OEM_ADLINK_24339, 0x6100, "aTCA-6100" }, + { IPMI_OEM_ADLINK_24339, 0x6200, "aTCA-6200" }, + { IPMI_OEM_ADLINK_24339, 0x6250, "aTCA-6250/6250STW" }, + { IPMI_OEM_ADLINK_24339, 0x6270, "aTCA-R6270" }, + { IPMI_OEM_ADLINK_24339, 0x6280, "aTCA-R6280" }, + { IPMI_OEM_ADLINK_24339, 0x6890, "aTCA-6890" }, + { IPMI_OEM_ADLINK_24339, 0x6891, "aTCA-6891" }, + { IPMI_OEM_ADLINK_24339, 0x6900, "aTCA-6900" }, + { IPMI_OEM_ADLINK_24339, 0x6905, "aTCA-R6905" }, + { IPMI_OEM_ADLINK_24339, 0x690A, "aTCA-R6900" }, + { IPMI_OEM_ADLINK_24339, 0x8214, "aTCA-8214" }, + { IPMI_OEM_ADLINK_24339, 0x8606, "aTCA-8606" }, + { IPMI_OEM_ADLINK_24339, 0x9300, "aTCA-9300" }, + { IPMI_OEM_ADLINK_24339, 0x9700, "aTCA-9700" }, + { IPMI_OEM_ADLINK_24339, 0x9700, "aTCA-R9700" }, + { IPMI_OEM_ADLINK_24339, 0x970D, "aTCA-9700D" }, + { IPMI_OEM_ADLINK_24339, 0x9710, "aTCA-9710" }, + { IPMI_OEM_ADLINK_24339, 0x9710, "aTCA-R9710" }, + { IPMI_OEM_ADLINK_24339, 0xF001, "aTCA-FN001" }, + { IPMI_OEM_ADLINK_24339, 0xF2A0, "aTCA-F2AX" }, + { IPMI_OEM_ADLINK_24339, 0xF5A0, "aTCA-F5AX" }, + /* CompactPCI Blades */ + { IPMI_OEM_ADLINK_24339, 0x3510, "cPCI-3510" }, + { IPMI_OEM_ADLINK_24339, 0x3970, "cPCI-3970" }, + { IPMI_OEM_ADLINK_24339, 0x6010, "cPCI-6010" }, + { IPMI_OEM_ADLINK_24339, 0x6210, "cPCI-6210" }, + { IPMI_OEM_ADLINK_24339, 0x6510, "cPCI-6510" }, + { IPMI_OEM_ADLINK_24339, 0x6520, "cPCI-6520" }, + { IPMI_OEM_ADLINK_24339, 0x6525, "cPCI-6525" }, + { IPMI_OEM_ADLINK_24339, 0x6530, "cPCI-6530/6530BL" }, + { IPMI_OEM_ADLINK_24339, 0x6600, "cPCI-6600" }, + { IPMI_OEM_ADLINK_24339, 0x6840, "cPCI-6840" }, + { IPMI_OEM_ADLINK_24339, 0x6870, "cPCI-6870" }, + { IPMI_OEM_ADLINK_24339, 0x6880, "cPCI-6880" }, + { IPMI_OEM_ADLINK_24339, 0x6910, "cPCI-6910" }, + { IPMI_OEM_ADLINK_24339, 0x6920, "cPCI-6920" }, + { IPMI_OEM_ADLINK_24339, 0x6930, "cPCI-6930" }, + { IPMI_OEM_ADLINK_24339, 0x6940, "cPCI-6940" }, + /* VPX Blades */ + { IPMI_OEM_ADLINK_24339, 0x3000, "VPX3000" }, + { IPMI_OEM_ADLINK_24339, 0x3001, "VPX3001" }, + { IPMI_OEM_ADLINK_24339, 0x3002, "VPX3002" }, + { IPMI_OEM_ADLINK_24339, 0x3010, "VPX3010" }, + { IPMI_OEM_ADLINK_24339, 0x3F10, "VPX3G10" }, + { IPMI_OEM_ADLINK_24339, 0x6000, "VPX6000" }, + /* Network Appliance */ + { IPMI_OEM_ADLINK_24339, 0x0410, "MXN-0410" }, + { IPMI_OEM_ADLINK_24339, 0x2600, "MCN-2600" }, + { IPMI_OEM_ADLINK_24339, 0x1500, "MCN-1500" }, { 0xffffff , 0xffff , NULL }, }; diff --git a/lib/ipmi_sunoem.c b/lib/ipmi_sunoem.c index 7f7a58b..e4fae65 100644 --- a/lib/ipmi_sunoem.c +++ b/lib/ipmi_sunoem.c @@ -29,14 +29,13 @@ * LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. */ +#define _XOPEN_SOURCE #include <stdlib.h> #include <stdio.h> #include <string.h> #include <strings.h> -#include <sys/types.h> #include <sys/socket.h> -#include <sys/time.h> #include <netinet/in.h> #include <arpa/inet.h> #include <errno.h> @@ -47,6 +46,7 @@ #include <sys/time.h> #include <limits.h> #include <fcntl.h> +#include <sys/select.h> #include <termios.h> @@ -469,7 +469,7 @@ ipmi_sunoem_led_get(struct ipmi_intf * intf, int argc, char ** argv) ledtype = str2val(argv[1], sunoem_led_type_vals); if (ledtype == 0xFF) lprintf(LOG_ERR, - "Unknow ledtype, will use data from the SDR oem field"); + "Unknown ledtype, will use data from the SDR oem field"); } if (strncasecmp(argv[0], "all", 3) == 0) { @@ -676,7 +676,7 @@ ipmi_sunoem_led_set(struct ipmi_intf * intf, int argc, char ** argv) ledtype = str2val(argv[2], sunoem_led_type_vals); if (ledtype == 0xFF) lprintf(LOG_ERR, - "Unknow ledtype, will use data from the SDR oem field"); + "Unknown ledtype, will use data from the SDR oem field"); } if (strncasecmp(argv[0], "all", 3) == 0) { diff --git a/lib/ipmi_tsol.c b/lib/ipmi_tsol.c index 70d7357..d89bcfd 100644 --- a/lib/ipmi_tsol.c +++ b/lib/ipmi_tsol.c @@ -33,7 +33,7 @@ #include <sys/types.h> #include <sys/stat.h> -#include <sys/poll.h> +#include <poll.h> #include <fcntl.h> #include <unistd.h> #include <errno.h> diff --git a/lib/ipmi_user.c b/lib/ipmi_user.c index 6074209..2780e61 100644 --- a/lib/ipmi_user.c +++ b/lib/ipmi_user.c @@ -29,6 +29,10 @@ * LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. */ +#define _BSD_SOURCE || \ + (_XOPEN_SOURCE >= 500 || \ + _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED) && \ + !(_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) #include <stdlib.h> #include <string.h> @@ -590,7 +594,7 @@ ipmi_user_priv(struct ipmi_intf *intf, int argc, char **argv) user_access.user_id); return (-1); } else { - printf("Set Privilege Level command successful (user %d)", + printf("Set Privilege Level command successful (user %d)\n", user_access.user_id); return 0; } @@ -602,6 +606,7 @@ ipmi_user_mod(struct ipmi_intf *intf, int argc, char **argv) /* Disable / Enable */ uint8_t user_id; uint8_t operation; + uint8_t ccode; if (argc != 2) { print_user_usage(); @@ -613,8 +618,14 @@ ipmi_user_mod(struct ipmi_intf *intf, int argc, char **argv) operation = (strncmp(argv[0], "disable", 7) == 0) ? IPMI_PASSWORD_DISABLE_USER : IPMI_PASSWORD_ENABLE_USER; - return _ipmi_set_user_password(intf, user_id, operation, + ccode = _ipmi_set_user_password(intf, user_id, operation, (char *)NULL, 0); + if (eval_ccode(ccode) != 0) { + lprintf(LOG_ERR, "Set User Password command failed (user %d)", + user_id); + return (-1); + } + return 0; } int @@ -29,6 +29,9 @@ * LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. */ +#define _SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE >= 500 || \ + _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED || \ + /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L #include <unistd.h> #include <stdio.h> @@ -96,7 +99,7 @@ void lperror(int level, const char * format, ...) return; } -/* +/* * open connection to syslog if daemon */ void log_init(const char * name, int isdaemon, int verbose) @@ -115,7 +118,7 @@ void log_init(const char * name, int isdaemon, int verbose) if (logpriv->name == NULL) fprintf(stderr, "ipmitool: malloc failure\n"); - + logpriv->daemon = isdaemon; logpriv->level = verbose + LOG_NOTICE; |