summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--COPYING109
-rw-r--r--COPYING.win155
-rw-r--r--ChangeLog46
-rw-r--r--Makefile.am3
-rw-r--r--Makefile.in3
-rw-r--r--NEWS14
-rw-r--r--README3
-rw-r--r--TODO32
-rw-r--r--cleanwin.cmd.orig25
-rwxr-xr-xconfigure167
-rw-r--r--configure.ac149
-rw-r--r--debpkg/changelog6
-rw-r--r--doc/Makefile32
-rw-r--r--doc/UserGuide38
-rw-r--r--doc/ipmiutil.spec17
-rw-r--r--doc/isol.865
-rw-r--r--lib/Makefile32
-rw-r--r--lib/lanplus/inc/ipmitool/ipmi_sdr.h2
-rw-r--r--lib/lanplus/lanplus.c12
-rw-r--r--lib/lanplus/lanplus_crypt_impl.c21
-rw-r--r--lib/lanplus/lanplus_defs.h3
-rw-r--r--lib/libipmiutil.pc2
-rw-r--r--scripts/Makefile32
-rwxr-xr-xsetver2
-rwxr-xr-xtest/testipmi.sh2
-rw-r--r--util/Makefile.am22
-rw-r--r--util/Makefile.in22
-rw-r--r--util/getopt.h-win3240
-rw-r--r--util/ialarms.c2
-rw-r--r--util/icmd.c2
-rw-r--r--util/iconfig.c4
-rw-r--r--util/idcmi.c2
-rw-r--r--util/idiscover.c38
-rw-r--r--util/ievents.c2
-rw-r--r--util/ifirewall.c2
-rw-r--r--util/ifirewall.h2
-rw-r--r--util/ifru.c2
-rw-r--r--util/ifruset.c2
-rw-r--r--util/igetevent.c3
-rw-r--r--util/ihealth.c7
-rw-r--r--util/ilan.c4
-rw-r--r--util/imb_api.h2
-rw-r--r--util/imbapi.c2
-rw-r--r--util/ipicmg.c2
-rw-r--r--util/ipmicmd.c48
-rw-r--r--util/ipmicmd.h1
-rw-r--r--util/ipmidir.c15
-rw-r--r--util/ipmilan.c20
-rw-r--r--util/ipmimv.c29
-rw-r--r--util/ipmiutil.c2
-rw-r--r--util/ipmiutil.mak10
-rw-r--r--util/ipmiutil.mak.orig423
-rw-r--r--util/ipmiutil64.mak7
-rw-r--r--util/ireset.c4
-rw-r--r--util/isel.c7
-rw-r--r--util/iseltime.c2
-rw-r--r--util/isensor.c62
-rw-r--r--util/iserial.c2
-rw-r--r--util/isol.c2
-rw-r--r--util/itsol.c7
-rw-r--r--util/iwdt.c2
-rw-r--r--util/mem_if.c12
-rw-r--r--util/oem_dell.c12
-rw-r--r--util/oem_sun.c2
-rw-r--r--util/oem_supermicro.c127
-rw-r--r--util/subs.c3
66 files changed, 1097 insertions, 836 deletions
diff --git a/COPYING b/COPYING
index 13a56a9..70c94bd 100644
--- a/COPYING
+++ b/COPYING
@@ -1,14 +1,79 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: ipmiutil
+Upstream-Contact: Andy Cress <arcress at users.sourceforge.net>
+Source: http://ipmiutil.sourceforge.net
+Comment: This COPYING file includes detail about each source file in ipmiutil
- The BSD 2.0 License
+Files: *
+Copyright: 2001-2008, Intel Corporation
+ 2009-2012, Kontron America
+ 2013, Andy Cress <arcress at users.sourceforge.net>
+License: BSD-3-clause
- Copyright (c) 2001-2008 Intel Corporation
- (c) 2009-2012 Kontron America, Inc.
- (c) 2013 Andy Cress <arcress at users.sourceforge.net>
- All rights reserved.
+Files: lib/lanplus/*
+Copyright: 2003 Sun Microsystems, Inc.
+License: BSD-3-clause
+Files: util/itsol.c
+Copyright: 2005 Tyan Computer Corp.
+License: BSD-3-clause
+
+Files: util/iekanalyzer.c
+Copyright: 2007 Kontron Canada, Inc.
+ 2003 Sun Microsystems, Inc.
+License: BSD-3-clause
+
+Files: util/md2.h
+Copyright: 2003 FreeIPMI Core Team
+Comment: Optional to include this file, only if 'configure --enable-gpl'
+License: GPL-2.0
+
+Files: util/AnsiTerm.cpp
+Copyright: 2009 Robert Nelson <robertnelson at users.sourceforge.net>
+License: BSD-2-clause
+
+Files: util/oem_dell.c
+Copyright: 2008, Dell Inc
+License: BSD-3-clause
+
+Files: util/oem_sun.c
+Copyright: 2005 Sun Microsystems, Inc.
+License: BSD-3-clause
+
+Files: util/ifirewall.c
+Copyright: 2010 Kontron America Inc.
+ 2005 International Business Machines, Inc.
+ 2003 Sun Microsystems, Inc.
+License: BSD-3-clause
+
+Files: util/ifwum.c util/ihpm.c
+Copyright: 2004-2006 Kontron Canada, Inc.
+ 2003 Sun Microsystems, Inc.
+License: BSD-3-clause
+
+Files: util/md5.c
+Copyright: 1999, 2000, 2002 Aladdin Enterprises.
+Comment: Aladdin unrestricted license is compatible with BSD-3-clause
+License: Aladdin
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+ L. Peter Deutsch
+ ghost@aladdin.com
+
+License: BSD-3-clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
-
a. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
b. Redistributions in binary form must reproduce the above copyright notice,
@@ -17,7 +82,25 @@
c. Neither the name of Kontron, nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+License: BSD-2-clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ a. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+ b. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -29,3 +112,17 @@
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+License: GPL-2.0
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ A copy of the GNU General Public License is available as
+ /usr/share/common-licenses/GPL-2 in the Debian distribution or on
+ the World Wide Web at http://www.gnu.org/copyleft/gpl.html. You can
+ also obtain it by writing to the Free Software Foundation, Inc.,
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/COPYING.win b/COPYING.win
new file mode 100644
index 0000000..e4acdb2
--- /dev/null
+++ b/COPYING.win
@@ -0,0 +1,155 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: ipmiutil
+Upstream-Contact: Andy Cress <arcress at users.sourceforge.net>
+Source: http://ipmiutil.sourceforge.net
+ http://www.openmash.org/lxr/source/src/getopt.c?c=gsm
+ http://www.openssl.org/source/openssl-0.9.8x.tar.gz
+Comment: This COPYING.win covers contributed source used in Windows ipmiutil.exe
+
+Files: getopt.c
+Copyright: 1987-2001 The Regents of the University of California.
+License: BSD-3-clause
+
+Files: getopt.h
+Copyright: 2007 Andy Cress <arcress at users.sourceforge.net>
+License: BSD-3-clause
+
+Files: openssl-0.9.8x/*
+Copyright: 1998-2011, The OpenSSL Project
+ 1995-1998, Eric Young (eay@cryptsoft.com)
+Comment:
+ The OpenSSL toolkit stays under a dual license, i.e. both the conditions of
+ the OpenSSL License and the original SSLeay license apply to the toolkit.
+ See below for the actual license texts. Actually both licenses are BSD-style
+ Open Source licenses. In case of any license issues related to OpenSSL
+ please contact openssl-core@openssl.org.
+License: OpenSSL-License and Original-SSLeay-License
+
+License: BSD-3-clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ a. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+ b. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+ c. Neither the name of Kontron, nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+License: OpenSSL-License
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ 3. All advertising materials mentioning features or use of this
+ software must display the following acknowledgment:
+ "This product includes software developed by the OpenSSL Project
+ for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
+
+ 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
+ endorse or promote products derived from this software without
+ prior written permission. For written permission, please contact
+ openssl-core@openssl.org.
+
+ 5. Products derived from this software may not be called "OpenSSL"
+ nor may "OpenSSL" appear in their names without prior written
+ permission of the OpenSSL Project.
+
+ 6. Redistributions of any form whatsoever must retain the following
+ acknowledgment:
+ "This product includes software developed by the OpenSSL Project
+ for use in the OpenSSL Toolkit (http://www.openssl.org/)"
+
+ THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
+ EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
+ ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ OF THE POSSIBILITY OF SUCH DAMAGE.
+ ====================================================================
+
+ This product includes cryptographic software written by Eric Young
+ (eay@cryptsoft.com). This product includes software written by Tim
+ Hudson (tjh@cryptsoft.com).
+
+
+License: Original-SSLeay-License
+ This package is an SSL implementation written
+ by Eric Young (eay@cryptsoft.com).
+ The implementation was written so as to conform with Netscapes SSL.
+
+ This library is free for commercial and non-commercial use as long as
+ the following conditions are aheared to. The following conditions
+ apply to all code found in this distribution, be it the RC4, RSA,
+ lhash, DES, etc., code; not just the SSL code. The SSL documentation
+ included with this distribution is covered by the same copyright terms
+ except that the holder is Tim Hudson (tjh@cryptsoft.com).
+
+ Copyright remains Eric Young's, and as such any Copyright notices in
+ the code are not to be removed.
+ If this package is used in a product, Eric Young should be given attribution
+ as the author of the parts of the library used.
+ This can be in the form of a textual message at program startup or
+ in documentation (online or textual) provided with the package.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. All advertising materials mentioning features or use of this software
+ must display the following acknowledgement:
+ "This product includes cryptographic software written by
+ Eric Young (eay@cryptsoft.com)"
+ The word 'cryptographic' can be left out if the rouines from the library
+ being used are not cryptographic related :-).
+ 4. If you include any Windows specific code (or a derivative thereof) from
+ the apps directory (application code) you must include an acknowledgement:
+ "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
+
+ THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+ The licence and distribution terms for any publically available version or
+ derivative of this code cannot be changed. i.e. this code cannot simply be
+ copied and put under another distribution licence
+ [including the GNU Public Licence.]
+
diff --git a/ChangeLog b/ChangeLog
index 9162bf0..f036aef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3940,7 +3940,7 @@ wdt.8 iwdt.8 (ipmiutil wdt)
ipmi_port (ipmi_port) ver 1.4
03/28/2014 ARCress ipmiutil-2.9.3 changes
- doc/ipmiutil.spec - add 'BuildRequires: systemd' if Fedora >= 15
+ doc/ipmiutil.spec - add 'BuildRequires: systemd' if Fedora >= 15 (#1018044)
scripts/install.cmd - split mkdir into two steps
scripts/ipmi_info - return 0 even if sysinfo is not supported
scripts/ipmi_port.sh - redirect threshold.sh output to thresh_out.txt
@@ -4025,7 +4025,7 @@ wdt.8 iwdt.8 (ipmiutil wdt)
util/ipmiutil*.mak - add mt.exe to embed manifest
lib/Makefile.am - new, fix for automake
lib/libipmiutil.pc.in - new, fix for pkg-config
- configure.ac - add support for pkg-config,
+ configure.ac - add support for pkg-config (from Arnaud Quette),
add enable-useflags option for cross-compiling
debpkg/ - renamed from debian/ to debpkg/ (jff)
util/iconfig.c - fix optvals loop out-of-bounds (from jff-webhosting.net)
@@ -4069,3 +4069,45 @@ wdt.8 iwdt.8 (ipmiutil wdt)
ihpm (ipmiutil hpm) ver 1.09
idiscover (ipmiutil discover) ver 1.9
ipmi_port (ipmi_port) ver 1.4
+
+10/10/2015 ARCress ipmiutil-2.9.7 changes
+ COPYING.win - new, include getopt.c and openssl copyright/license
+ COPYING - updated to Debian format for clarity
+ Makefile.am - filter out *.rej/.orig files from tarball
+ doc/UserGuide - updated Windows ipmidrv.sys information for Win2012
+ util/ipmiutil.mak - cleanup
+ util/ipmiutil64.mak - cleanup
+ util/ipmilan.c - if detect LAN2.0 support, always switch to -Flan2
+ to avoid errors from Dell or Huawei firmware.
+ util/isel.c - allow access if not superuser (sr#15)
+ util/isensor.c - allow access if not superuser (sr#15),
+ add checks for idstr uninitialized,
+ handle stdout/stderr messages,
+ fix ids if -i used with -j
+ util/subs.c - handle stdout/stderr messages in lprintf
+ util/ipmidir.c - return without trying if no SMBIOS IPMI (RH#1219325)
+ util/ihealth.c - recognize SMC X10DRH
+ util/oem_supermicro.c - added powersupply status function
+ util/idiscover.c - add HPUX ia64 compile fixes
+ util/igetevent.c - add HPUX ia64 compile fixes
+ util/mem_if.c - if ARM64, do not use /dev/mem
+ util/Makefile.am - set SONAME as libipmiutil.so.1
+ lib/lanplus/lanplus.c - send "Connected to" message to stdout only,
+ add HPUX to be like SOLARIS for structures
+ lib/lanplus/lanplus_crypt_impl.c - do not recreate c:/.rnd if there
+ doc/ipmiutil.spec - move libipmiutil.so to base rpm (RH#1177213),
+ fix IPMIret issue for sel -v
+ configure.ac - For HP-UX, add imb and some cosmetic cleanup
+ configure.ac: use CC instead of gcc, full link for stack protector test (from Thomas Petazzoni)
+ README: update bug tracker link (from Baruch Siach)
+ util/imb_api.h: Avoid wchar_t redefinition (from Baruch Siach)
+ util/ipmimv.c: Add missing sys/select.h include (from Baruch Siach)
+ util/mem_if.c: Add missing linux/param.h header include (from Baruch Siach)
+ ipmiutil-2.9.7 contains:
+ ipmiutil (ipmiutil) ver 2.97
+ ...(various subcommands) ver 2.97
+ iekanalyzer (ipmiutil ekanalyzer) ver 1.00
+ ifwum (ipmiutil fwum) ver 1.3
+ ihpm (ipmiutil hpm) ver 1.09
+ idiscover (ipmiutil discover) ver 1.9
+ ipmi_port (ipmi_port) ver 1.4
diff --git a/Makefile.am b/Makefile.am
index 594eac6..92a03ce 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,6 +19,7 @@ RPMB = rpmbuild
rpm: $(RSPEC)
make tarball
+ mkdir -p $(SOURCEDIR)
cp -f $(TARDIR)/$(PNAME).tar.gz $(SOURCEDIR)
$(RPMB) -bb $(RSPEC)
$(RPMB) -bs $(RSPEC)
@@ -36,6 +37,8 @@ tarball:
cd $(TMPDIR); rm -f util/events
cd $(TMPDIR); sed -i 's/\r//' ChangeLog AUTHORS COPYING NEWS README TODO doc/UserGuide
cd $(TMPDIR); chmod 644 doc/UserGuide
+ cd $(TMPDIR); find . -name '*.orig' -delete
+ cd $(TMPDIR); find . -name '*.rej' -delete
cd $(TMPDIR); cd ..; tar -czvf $(TARDIR)/$(PNAME).tar.gz $(PNAME)
ls $(TARDIR)/*.gz
rm -rf $(TMPDIR)
diff --git a/Makefile.in b/Makefile.in
index 2ab6d81..0f65e8c 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -749,6 +749,7 @@ uninstall-am:
rpm: $(RSPEC)
make tarball
+ mkdir -p $(SOURCEDIR)
cp -f $(TARDIR)/$(PNAME).tar.gz $(SOURCEDIR)
$(RPMB) -bb $(RSPEC)
$(RPMB) -bs $(RSPEC)
@@ -766,6 +767,8 @@ tarball:
cd $(TMPDIR); rm -f util/events
cd $(TMPDIR); sed -i 's/\r//' ChangeLog AUTHORS COPYING NEWS README TODO doc/UserGuide
cd $(TMPDIR); chmod 644 doc/UserGuide
+ cd $(TMPDIR); find . -name '*.orig' -delete
+ cd $(TMPDIR); find . -name '*.rej' -delete
cd $(TMPDIR); cd ..; tar -czvf $(TARDIR)/$(PNAME).tar.gz $(PNAME)
ls $(TARDIR)/*.gz
rm -rf $(TMPDIR)
diff --git a/NEWS b/NEWS
index 59f7987..04b87b5 100644
--- a/NEWS
+++ b/NEWS
@@ -1,9 +1,9 @@
IPMIUTIL NEWS
-This project started in October 2001 as part of the Carrier Grade Linux effort.
+In October 2001, this project started as part of the Carrier Grade Linux effort.
It was then known as 'panicsel' ("http://panicsel.sf.net") and included a kernel patch to write a Linux panic event to the IPMI firmware log, as well as utilities.
-This code was first included in MontaVista CGE Linux 2.1 in July 2002.
+In July 2002, this code was first included in MontaVista CGE Linux 2.1.
The panicsel functionality was included in OSDL CGL 1.0 and 2.0 requirements.
The kernel panic functionality was included in the OpenIPMI driver for 2.6 Linux kernels, and in the Intel IMB Linux driver v28 and greater.
@@ -65,10 +65,14 @@ In Sep 2010 (2.7.1) added ppc64, mips64, sparc arch support
In Nov 2010 (2.7.2) added Debian package support
In Nov 2010 Fedora 14 released with ipmiutil-2.6.8
In Dec 2010 (2.7.3) added SuperMicro OEM functions
-In Mar 2011 OpenSuSE 11.4 released with ipmituil-2.7.2
+In Mar 2011 OpenSuSE 11.4 released with ipmiutil-2.7.2
In May 2011 (2.7.6) added VLAN support and WIN64 fixes
-In Sep 2011 (2.7.8) added Dell OEM functions, PICMG 2.3, IPv6, systemd, tsol
+In Sep 2011 (2.7.8) added IPv6, systemd, Dell OEM functions, PICMG 2.3, tsol
In Oct 2011 (2.7.9) support Wind River and ARM cross-compile, Intel S2600
In Dec 2011 (2.8.0) added DCMI 1.1 commands, devel pkg, MSI package
In Feb 2012 (2.8.1) added Quanta S99Q functions, Dell fixes, Intel ME fixes
-
+In Mar 2012 (2.8.2) added Intel Romley OEM support
+In Jun 2012 (2.8.4) added support for HP-UX builds and DCMI 1.1 commands
+In Oct 2012 (2.8.6) added pre-built Windows DLL for sample development apps
+In Feb 2013 (2.8.8) added much more SuperMicro OEM support
+In May 2013 (2.9.1) added support for MacOSX client
diff --git a/README b/README
index 1d58b89..6cc7d3d 100644
--- a/README
+++ b/README
@@ -130,8 +130,7 @@ or add panic=10 to the kernel line in grub.conf.
KNOWN PROBLEMS
------------------------------
-See http://sourceforge.net/tracker/?group_id=116222&func=browse for
-a list of bugs.
+See http://sourceforge.net/p/ipmiutil/_list/tickets for a list of bugs.
Contact for best-effort support: arcress at users.sourceforge.net or
ipmiutil-developers at lists.sourceforge.net or http://ipmiutil.sf.net
diff --git a/TODO b/TODO
index d4f2747..92dc32d 100644
--- a/TODO
+++ b/TODO
@@ -2,24 +2,37 @@
IPMIUTIL PROJECT TODO LIST:
IPV6:
- . implement IPV6 for Windows
+ . implement IPV6 for Windows (#ifdef WIN32 case)
-Change ipmicmd.c/ipmilan.c to be thread-safe if accessing multiple nodes.
- Currently is only conditionally safe, if threads access the same node.
+Thread-safe changes for IPMI LAN:
+ Change ipmicmd.c/ipmilan.c to be thread-safe if accessing multiple nodes.
+ Currently it is only conditionally safe, if threads access the same node.
Will require adding a context struct param to the ipmi_cmd*() funcs.
- Probably need to add new thread-safe functions to retain back-compatibility.
+ May need to add new thread-safe functions to retain back-compatibility.
PARTIAL in ipmiutil-2.9.0, multiple nodes in sequence is fixed
. need to use context structure for ipmilan
+Add pkg-config support
+ COMPLETE in ipmiutil-2.9.5 (in configure.ac)
+
+Resolve MS ipmidrv.sys WBEM access memory leak:
+ This bug has been reported to Microsoft in Oct 2012 as shown below.
+ The workaround is to use the Intel imbdrv.sys driver instead.
+ See the ipmiutil UserGuide section 5.1 for details.
+ https://sourceforge.net/p/ipmiutil/support-requests/11/
+ https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/ca4df181-7fd4-4912-83a0-5896b030e3ca/latest-version-of-microsoft-ipmi-driver-ipmidrvsys?forum=wdk
+
+stdout/stderr debug messages mixed
+ . have a variable for stderr and if -x debug, set it to stdout.
+ . implemented in util/subs.c lprintf() based on log level
+ COMPLETE in ipmiutil-2.9.7
+
SPD decoding:
. handle DDR4 SPD format
. expose SPD decoding from file/buffer, not just FRU
c handle DDR3 SPD 1.0 format
PARTIAL in ipmiutil-2.9.1
-stdout/stderr debug messages mixed
- . have a global variable for stderr and if -x debug, set it to stdout.
-
SuperMicro Users:
. implement an OEM cmd to set user privilege level (needs research)
@@ -34,9 +47,10 @@ Add DCMI 1.5 commands for NetFn 0x2C to ipmiutil
. Get/Set Thermal Limit (DCMI 1.5)
Add an option/variant of canonical output for CSV (delimiter = ',')
+ The current delimiter for -c is '|'
Add support for MAC OSX AppleBMC.kext driver
- not yet implemented, pending some documentation.
+ Not yet implemented, pending some documentation from Apple.
More automated testing
Started this in ipmiutil-2.6.6 with testipmi.sh, but it could be
@@ -67,7 +81,7 @@ Add support for a MAC OSX client
We need a system running OSX on which to build and test this.
Changes to compile on MACOS submitted to SVN on 04/12/2013
Support for AppleBMC.kext not yet implemented, pending documentation.
- COMPLETED in ipmiutil-2.9.1
+ COMPLETE in ipmiutil-2.9.1
Add snmptrap functionality to getevent -r example script
COMPLETE in ipmiutil-2.9.1
diff --git a/cleanwin.cmd.orig b/cleanwin.cmd.orig
deleted file mode 100644
index 38b08bf..0000000
--- a/cleanwin.cmd.orig
+++ /dev/null
@@ -1,25 +0,0 @@
-@echo off
-REM # cleanwin.cmd
-REM # clean ipmiutil for windows
-REM #
-
-REM call cleanssl (?)
-
-set UTMAKE=ipmiutil.mak
-echo %LIBPATH% |findstr /C:amd64 >NUL
-if %errorlevel% EQU 0 set UTMAKE=ipmiutil64.mak
-
-cd lib
-nmake /nologo -f ipmilib.mak clean
-cd ..
-REM # echo make lib done
-
-cd util
-nmake /nologo -f %UTMAKE% clean
-del tmp\*.obj 2>NULL
-del *.pdb 2>NUL
-del *.manifest 2>NUL
-cd ..
-REM # echo make util done
-
-echo cleanwin ipmiutil done
diff --git a/configure b/configure
index c657e03..b37e09c 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for ipmiutil 2.9.6.
+# Generated by GNU Autoconf 2.63 for ipmiutil 2.9.7.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
@@ -743,8 +743,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='ipmiutil'
PACKAGE_TARNAME='ipmiutil'
-PACKAGE_VERSION='2.9.6'
-PACKAGE_STRING='ipmiutil 2.9.6'
+PACKAGE_VERSION='2.9.7'
+PACKAGE_STRING='ipmiutil 2.9.7'
PACKAGE_BUGREPORT=''
ac_unique_file="util/ipmiutil.c"
@@ -1502,7 +1502,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures ipmiutil 2.9.6 to adapt to many kinds of systems.
+\`configure' configures ipmiutil 2.9.7 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1572,7 +1572,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of ipmiutil 2.9.6:";;
+ short | recursive ) echo "Configuration of ipmiutil 2.9.7:";;
esac
cat <<\_ACEOF
@@ -1681,7 +1681,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-ipmiutil configure 2.9.6
+ipmiutil configure 2.9.7
generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1695,7 +1695,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by ipmiutil $as_me 2.9.6, which was
+It was created by ipmiutil $as_me 2.9.7, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
@@ -2549,7 +2549,7 @@ fi
# Define the identity of the package.
PACKAGE='ipmiutil'
- VERSION='2.9.6'
+ VERSION='2.9.7'
cat >>confdefs.h <<_ACEOF
@@ -12888,7 +12888,7 @@ fi
tmpspec=/tmp/iuspec.tmp$$
archm=`uname -m`
-archp=`uname -p`
+archp=`uname -p 2>/dev/null`
sysname=`uname -s`
LIB_DIR="/usr/lib"
isredhat=0
@@ -13042,19 +13042,23 @@ fi
if test "x$enable_systemd" = "xyes"; then
GPL_CFLAGS="$GPL_CFLAGS -DENABLE_SYSTEMD"
# if systemd enabled, install service scripts in unitdir
- SYSTEMD_DIR=`rpm --eval "%{_unitdir}"`
+ which rpm >/dev/null 2>&1
+ if test $? -eq 0 ; then
+ SYSTEMD_DIR=`rpm --eval "%{_unitdir}"`
+ else
+ SYSTEMD_DIR=/usr/share/ipmiutil
+ fi
else
# otherwise install the systemd service scripts in the data dir
- if test "x$sysname" = "xDarwin" ; then
- # MacOS 'which' command returns 0 always
- SYSTEMD_DIR=/usr/share/ipmiutil
- else
- which rpm >/dev/null 2>&1
- if test $? -eq 0 ; then
- datad=`rpm --eval "%{_datadir}"`
- SYSTEMD_DIR=${datad}/ipmiutil
- else
- SYSTEMD_DIR=/usr/share/ipmiutil
+ SYSTEMD_DIR=/usr/share/ipmiutil
+ if test "x$sysname" != "xDarwin" ; then
+ if test "x$os" != "xhpux" ; then
+ # MacOS and HP-UX: 'which' command returns 0 always
+ which rpm >/dev/null 2>&1
+ if test $? -eq 0 ; then
+ datad=`rpm --eval "%{_datadir}"`
+ SYSTEMD_DIR=${datad}/ipmiutil
+ fi
fi
fi
fi
@@ -13133,13 +13137,13 @@ fi
PKG_DIR=/usr/src/packages
INS_LIB=""
-SHR_LINK="libipmiutil.so"
+SHR_LINK="libipmiutil.so.1"
init0=
if test "x$sysname" = "xSunOS"; then
echo "Detected Solaris"
os=solaris
# archp=`uname -p`
- if test -d "/usr/sfw/lib"; then
+ if test -d "/usr/sfw/lib"; then
sfwdir=/usr/sfw
else
sfwdir=/usr/local
@@ -13163,10 +13167,10 @@ else
os=linux
tmpc=/tmp/tmp.c
tmpo=/tmp/tmp.o
- echo $ECHO_N "checking compile warning flags ... $ECHO_C"
- cfwarn="-Wno-pointer-sign -Wno-sign-conversion -Wunused-result -Wgnu-designator"
+ echo $ECHO_N "checking compile sign warning flags ... $ECHO_C"
+ cfwarn="-Wno-pointer-sign -Wno-sign-conversion -Wunused-result"
echo "int main() { return(1); }" >$tmpc
- gcc -o $tmpo -c $cfwarn $tmpc >/dev/null 2>&1
+ $CC -o $tmpo -c $cfwarn $tmpc >/dev/null 2>&1
if test $? -ne 0 ; then
cfwarn=
echo "skip"
@@ -13174,10 +13178,21 @@ else
echo "ok, suppress excess warnings"
fi
rm -f $tmpc $tmpo >/dev/null 2>&1
+ echo $ECHO_N "checking compile gnu warning flags ... $ECHO_C"
+ cfgnu="-Wgnu-designator"
+ echo "int main() { return(1); }" >$tmpc
+ $CC -o $tmpo -c $cfgnu $tmpc >/dev/null 2>&1
+ if test $? -ne 0 ; then
+ cfgnu=
+ echo "skip"
+ else
+ echo "ok, suppress excess warnings"
+ fi
+ rm -f $tmpc $tmpo >/dev/null 2>&1
echo $ECHO_N "checking compile fortify flags ... $ECHO_C"
cfhard="-fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
echo "int main() { return(1); }" >$tmpc
- gcc -o $tmpo -c $cfhard $tmpc >/dev/null 2>&1
+ $CC -o $tmpo $cfhard $tmpc >/dev/null 2>&1
if test $? -ne 0 ; then
cfhard=
echo "skip"
@@ -13194,24 +13209,24 @@ else
else
which rpm >/dev/null 2>&1
if test $? -eq 0; then
- pkgtop=`rpm --eval "%{_topdir}"`
- PKG_DIR=$pkgtop
+ pkgtop=`rpm --eval "%{_topdir}"`
+ PKG_DIR=$pkgtop
fi
fi
if test -f "/etc/redhat-release"; then
- echo "Detected Red Hat Linux"
- os=redhat
- isredhat=1
- fi
+ echo "Detected Red Hat Linux"
+ os=redhat
+ isredhat=1
+ fi
if test -f "/etc/SuSE-release"; then
- echo "Detected SuSE Linux"
- os=suse
- sed -e 's/# POST_INSTALL/if [ ! -f \/etc\/snmp\/snmpd.conf ]; then\n if [ -f \/etc\/ucdsnmpd.conf ]; then\n mkdir -p \/etc\/snmp; ln -s \/etc\/ucdsnmpd.conf \/etc\/snmp\/snmpd.conf\n fi\nif [ -f \/etc\/snmpd.conf ]; then\nmkdir -p \/etc\/snmp; ln -s \/etc\/snmpd.conf \/etc\/snmp\/snmpd.conf\nfi\nfi\n#/' -e 's/make install DEST/make install-strip DEST/' doc/ipmiutil.spec >$tmpspec
- cp -f $tmpspec doc/ipmiutil.spec
- fi
- if test -f "/etc/mvl-release"; then
- echo "Detected MontaVista Linux"
- os=montavista
+ echo "Detected SuSE Linux"
+ os=suse
+ sed -e 's/# POST_INSTALL/if [ ! -f \/etc\/snmp\/snmpd.conf ]; then\n if [ -f \/etc\/ucdsnmpd.conf ]; then\n mkdir -p \/etc\/snmp; ln -s \/etc\/ucdsnmpd.conf \/etc\/snmp\/snmpd.conf\n fi\nif [ -f \/etc\/snmpd.conf ]; then\nmkdir -p \/etc\/snmp; ln -s \/etc\/snmpd.conf \/etc\/snmp\/snmpd.conf\nfi\nfi\n#/' -e 's/make install DEST/make install-strip DEST/' doc/ipmiutil.spec >$tmpspec
+ cp -f $tmpspec doc/ipmiutil.spec
+ fi
+ if test -f "/etc/mvl-release"; then
+ echo "Detected MontaVista Linux"
+ os=montavista
init0=/etc/init.d
sed -e 's/openssl-devel/openssl-dev\n%ifarch x86_pentium3 x86_pentium4\nAutoReqProv: No\n%endif/' -e 's/%{_mandir}/\/usr\/share\/man/' -e 's/%{_initrddir}/\/etc\/init.d/' -e 's/%{_sysconfdir}/\/etc/' -e 's/# POST_INSTALL/newcrypto=%{_libdir}\/libcrypto.so.4\nif [ ! -f $newcrypto ]; then\n cp -f %{_libdir}\/libcrypto.so.0 $newcrypto\nfi\n#/' -e 's/make install DEST/make install-strip DEST/' doc/ipmiutil.spec >$tmpspec
cp -f $tmpspec doc/ipmiutil.spec
@@ -13236,7 +13251,7 @@ else
sed -i 's/# Default-Start:/# Default-Start: 3 4 5/' $init_scripts
sed -i 's/# Default-Stop:/# Default-Stop: 0 1 2 6/' $init_scripts
fi
- if test -f "$LIB_DIR/libcrypto.so"; then
+ if test -f "$LIB_DIR/libcrypto.so"; then
strings $LIB_DIR/libcrypto.so | grep EVP_md2 >/dev/null 2>&1
if test $? -ne 0; then
echo "No MD2 detected in openssl libcrypto.so"
@@ -13246,50 +13261,52 @@ else
echo "No openssl $LIB_DIR/libcrypto.so detected"
MD2_CFLAGS="-DSKIP_MD2"
fi
- OS_CFLAGS="-DLINUX $MD2_CFLAGS -fPIC $cfwarn $cfhard"
+ OS_CFLAGS="-DLINUX $MD2_CFLAGS -fPIC $cfwarn $cfgnu $cfhard"
else
+ macos=1 # =1 means not mac
# usually "x$sysname" = "xFreeBSD", but allow NetBSD
# echo $sysname | grep 'BSD' >/dev/null 2>&1
- macos=1
echo $sysname | grep -q BSD
bsd=$?
if test "x$sysname" = "xDarwin" ; then
if test "$archp" = "powerpc" ; then
macos=0
- else
+ else
+ # else treat Darwin like BSD
bsd=0
fi
fi
uname -a | grep -i HP-UX >/dev/null 2>&1
hpux=$?
- if test $bsd -eq 0; then
- os=bsd
- OS_CFLAGS="-DBSD -fPIC"
- OS_LFLAGS=""
- OS_DRIVERS="ipmimv.c ipmidir.c"
- drivers="open direct"
+ if test $hpux -eq 0; then
+ echo "Detected HP-UX"
+ os=hpux
+ MD2_CFLAGS="-DSKIP_MD2"
+ OS_CFLAGS="-DHPUX $MD2_CFLAGS"
+ OS_LFLAGS=""
+ OS_DRIVERS="imbapi.c ipmimv.c ipmidir.c"
+ drivers="imb open direct"
+ SHR_LINK=""
else
- if test $hpux -eq 0; then
- echo "Detected HP-UX"
- os=hpux
- MD2_CFLAGS="-DSKIP_MD2"
- OS_CFLAGS="-DHPUX $MD2_CFLAGS"
- OS_LFLAGS=""
- OS_DRIVERS="ipmimv.c"
- drivers="open"
- SHR_LINK=""
+ if test $bsd -eq 0; then
+ echo "Detected BSD"
+ os=bsd
+ OS_CFLAGS="-DBSD -fPIC"
+ OS_LFLAGS=""
+ OS_DRIVERS="ipmimv.c ipmidir.c"
+ drivers="open direct"
elif test $macos -eq 0; then
echo "Detected MacOSX"
os=macos
MD2_CFLAGS="-DSKIP_MD2"
OS_CFLAGS="-DMACOS $MD2_CFLAGS -fPIC"
OS_LFLAGS=""
- OS_DRIVERS="ipmimv.c ipmidir.c"
- drivers="open direct"
- SHR_LINK=""
- # optionally check for AppleBMC.kext here?
+ OS_DRIVERS="ipmimv.c ipmidir.c"
+ drivers="open direct"
+ SHR_LINK=""
+ # optionally check for AppleBMC.kext here?
else
- # not Solaris, Linux, BSD, or HP-UX = error
+ # not Solaris, Linux, BSD, or HP-UX = error
echo "OS $sysname not yet supported"
exit 1
fi
@@ -13299,12 +13316,14 @@ fi
if test "x$init0" = "x" ; then
if test "x$os" != "xmacos" ; then
- which rpmbuild >/dev/null 2>&1
- if test $? -eq 0 ; then
- init1=`rpmbuild --showrc |grep " _initrddir" | cut -d'}' -f2`
- if test "x$init1" != "x" ; then
- init0=/etc/${init1}
- fi
+ if test "x$os" != "xhpux" ; then
+ which rpmbuild >/dev/null 2>&1
+ if test $? -eq 0 ; then
+ init1=`rpmbuild --showrc |grep " _initrddir" | cut -d'}' -f2`
+ if test "x$init1" != "x" ; then
+ init0=/etc/${init1}
+ fi
+ fi
fi
fi
fi
@@ -13791,7 +13810,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by ipmiutil $as_me 2.9.6, which was
+This file was extended by ipmiutil $as_me 2.9.7, which was
generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -13854,7 +13873,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-ipmiutil config.status 2.9.6
+ipmiutil config.status 2.9.7
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
@@ -15713,6 +15732,10 @@ if test "x$sysname" = "xSunOS"; then
# -e 's/ipmidir.c/ipmibmc.c/'
cp -f /tmp/make util/Makefile
fi
+if test "x$os" = "xhpux" ; then
+ sed -e 's/^.NOEXPORT:/#.NOEXPORT:/' util/Makefile >/tmp/make
+ cp -f /tmp/make util/Makefile
+fi
{ $as_echo "$as_me:$LINENO: result: " >&5
$as_echo "" >&6; }
diff --git a/configure.ac b/configure.ac
index 98a7024..344b27a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(ipmiutil,2.9.6)
+AC_INIT(ipmiutil,2.9.7)
AC_CONFIG_SRCDIR(util/ipmiutil.c)
echo "ipmiutil version ${PACKAGE_VERSION}"
AM_CONFIG_HEADER(config.h)
@@ -50,7 +50,7 @@ fi
tmpspec=/tmp/iuspec.tmp$$
archm=`uname -m`
-archp=`uname -p`
+archp=`uname -p 2>/dev/null`
sysname=`uname -s`
LIB_DIR="/usr/lib"
isredhat=0
@@ -195,19 +195,23 @@ AC_ARG_ENABLE([systemd],
if test "x$enable_systemd" = "xyes"; then
GPL_CFLAGS="$GPL_CFLAGS -DENABLE_SYSTEMD"
# if systemd enabled, install service scripts in unitdir
- SYSTEMD_DIR=`rpm --eval "%{_unitdir}"`
+ which rpm >/dev/null 2>&1
+ if test $? -eq 0 ; then
+ SYSTEMD_DIR=`rpm --eval "%{_unitdir}"`
+ else
+ SYSTEMD_DIR=/usr/share/ipmiutil
+ fi
else
# otherwise install the systemd service scripts in the data dir
- if test "x$sysname" = "xDarwin" ; then
- # MacOS 'which' command returns 0 always
- SYSTEMD_DIR=/usr/share/ipmiutil
- else
- which rpm >/dev/null 2>&1
- if test $? -eq 0 ; then
- datad=`rpm --eval "%{_datadir}"`
- SYSTEMD_DIR=${datad}/ipmiutil
- else
- SYSTEMD_DIR=/usr/share/ipmiutil
+ SYSTEMD_DIR=/usr/share/ipmiutil
+ if test "x$sysname" != "xDarwin" ; then
+ if test "x$os" != "xhpux" ; then
+ # MacOS and HP-UX: 'which' command returns 0 always
+ which rpm >/dev/null 2>&1
+ if test $? -eq 0 ; then
+ datad=`rpm --eval "%{_datadir}"`
+ SYSTEMD_DIR=${datad}/ipmiutil
+ fi
fi
fi
fi
@@ -276,13 +280,13 @@ fi
PKG_DIR=/usr/src/packages
INS_LIB=""
-SHR_LINK="libipmiutil.so"
+SHR_LINK="libipmiutil.so.1"
init0=
if test "x$sysname" = "xSunOS"; then
echo "Detected Solaris"
os=solaris
# archp=`uname -p`
- if test -d "/usr/sfw/lib"; then
+ if test -d "/usr/sfw/lib"; then
sfwdir=/usr/sfw
else
sfwdir=/usr/local
@@ -306,10 +310,10 @@ else
os=linux
tmpc=/tmp/tmp.c
tmpo=/tmp/tmp.o
- echo $ECHO_N "checking compile warning flags ... $ECHO_C"
- cfwarn="-Wno-pointer-sign -Wno-sign-conversion -Wunused-result -Wgnu-designator"
+ echo $ECHO_N "checking compile sign warning flags ... $ECHO_C"
+ cfwarn="-Wno-pointer-sign -Wno-sign-conversion -Wunused-result"
echo "int main() { return(1); }" >$tmpc
- gcc -o $tmpo -c $cfwarn $tmpc >/dev/null 2>&1
+ $CC -o $tmpo -c $cfwarn $tmpc >/dev/null 2>&1
if test $? -ne 0 ; then
cfwarn=
echo "skip"
@@ -317,10 +321,21 @@ else
echo "ok, suppress excess warnings"
fi
rm -f $tmpc $tmpo >/dev/null 2>&1
+ echo $ECHO_N "checking compile gnu warning flags ... $ECHO_C"
+ cfgnu="-Wgnu-designator"
+ echo "int main() { return(1); }" >$tmpc
+ $CC -o $tmpo -c $cfgnu $tmpc >/dev/null 2>&1
+ if test $? -ne 0 ; then
+ cfgnu=
+ echo "skip"
+ else
+ echo "ok, suppress excess warnings"
+ fi
+ rm -f $tmpc $tmpo >/dev/null 2>&1
echo $ECHO_N "checking compile fortify flags ... $ECHO_C"
cfhard="-fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
echo "int main() { return(1); }" >$tmpc
- gcc -o $tmpo -c $cfhard $tmpc >/dev/null 2>&1
+ $CC -o $tmpo $cfhard $tmpc >/dev/null 2>&1
if test $? -ne 0 ; then
cfhard=
echo "skip"
@@ -337,24 +352,24 @@ else
else
which rpm >/dev/null 2>&1
if test $? -eq 0; then
- pkgtop=`rpm --eval "%{_topdir}"`
- PKG_DIR=$pkgtop
+ pkgtop=`rpm --eval "%{_topdir}"`
+ PKG_DIR=$pkgtop
fi
fi
if test -f "/etc/redhat-release"; then
- echo "Detected Red Hat Linux"
- os=redhat
- isredhat=1
- fi
+ echo "Detected Red Hat Linux"
+ os=redhat
+ isredhat=1
+ fi
if test -f "/etc/SuSE-release"; then
- echo "Detected SuSE Linux"
- os=suse
- sed -e 's/# POST_INSTALL/if [ ! -f \/etc\/snmp\/snmpd.conf ]; then\n if [ -f \/etc\/ucdsnmpd.conf ]; then\n mkdir -p \/etc\/snmp; ln -s \/etc\/ucdsnmpd.conf \/etc\/snmp\/snmpd.conf\n fi\nif [ -f \/etc\/snmpd.conf ]; then\nmkdir -p \/etc\/snmp; ln -s \/etc\/snmpd.conf \/etc\/snmp\/snmpd.conf\nfi\nfi\n#/' -e 's/make install DEST/make install-strip DEST/' doc/ipmiutil.spec >$tmpspec
- cp -f $tmpspec doc/ipmiutil.spec
- fi
- if test -f "/etc/mvl-release"; then
- echo "Detected MontaVista Linux"
- os=montavista
+ echo "Detected SuSE Linux"
+ os=suse
+ sed -e 's/# POST_INSTALL/if [ ! -f \/etc\/snmp\/snmpd.conf ]; then\n if [ -f \/etc\/ucdsnmpd.conf ]; then\n mkdir -p \/etc\/snmp; ln -s \/etc\/ucdsnmpd.conf \/etc\/snmp\/snmpd.conf\n fi\nif [ -f \/etc\/snmpd.conf ]; then\nmkdir -p \/etc\/snmp; ln -s \/etc\/snmpd.conf \/etc\/snmp\/snmpd.conf\nfi\nfi\n#/' -e 's/make install DEST/make install-strip DEST/' doc/ipmiutil.spec >$tmpspec
+ cp -f $tmpspec doc/ipmiutil.spec
+ fi
+ if test -f "/etc/mvl-release"; then
+ echo "Detected MontaVista Linux"
+ os=montavista
init0=/etc/init.d
sed -e 's/openssl-devel/openssl-dev\n%ifarch x86_pentium3 x86_pentium4\nAutoReqProv: No\n%endif/' -e 's/%{_mandir}/\/usr\/share\/man/' -e 's/%{_initrddir}/\/etc\/init.d/' -e 's/%{_sysconfdir}/\/etc/' -e 's/# POST_INSTALL/newcrypto=%{_libdir}\/libcrypto.so.4\nif [ ! -f $newcrypto ]; then\n cp -f %{_libdir}\/libcrypto.so.0 $newcrypto\nfi\n#/' -e 's/make install DEST/make install-strip DEST/' doc/ipmiutil.spec >$tmpspec
cp -f $tmpspec doc/ipmiutil.spec
@@ -379,7 +394,7 @@ else
sed -i 's/# Default-Start:/# Default-Start: 3 4 5/' $init_scripts
sed -i 's/# Default-Stop:/# Default-Stop: 0 1 2 6/' $init_scripts
fi
- if test -f "$LIB_DIR/libcrypto.so"; then
+ if test -f "$LIB_DIR/libcrypto.so"; then
strings $LIB_DIR/libcrypto.so | grep EVP_md2 >/dev/null 2>&1
if test $? -ne 0; then
echo "No MD2 detected in openssl libcrypto.so"
@@ -389,50 +404,52 @@ else
echo "No openssl $LIB_DIR/libcrypto.so detected"
MD2_CFLAGS="-DSKIP_MD2"
fi
- OS_CFLAGS="-DLINUX $MD2_CFLAGS -fPIC $cfwarn $cfhard"
+ OS_CFLAGS="-DLINUX $MD2_CFLAGS -fPIC $cfwarn $cfgnu $cfhard"
else
+ macos=1 # =1 means not mac
# usually "x$sysname" = "xFreeBSD", but allow NetBSD
# echo $sysname | grep 'BSD' >/dev/null 2>&1
- macos=1
echo $sysname | grep -q BSD
bsd=$?
if test "x$sysname" = "xDarwin" ; then
if test "$archp" = "powerpc" ; then
macos=0
- else
+ else
+ # else treat Darwin like BSD
bsd=0
fi
fi
uname -a | grep -i HP-UX >/dev/null 2>&1
hpux=$?
- if test $bsd -eq 0; then
- os=bsd
- OS_CFLAGS="-DBSD -fPIC"
- OS_LFLAGS=""
- OS_DRIVERS="ipmimv.c ipmidir.c"
- drivers="open direct"
+ if test $hpux -eq 0; then
+ echo "Detected HP-UX"
+ os=hpux
+ MD2_CFLAGS="-DSKIP_MD2"
+ OS_CFLAGS="-DHPUX $MD2_CFLAGS"
+ OS_LFLAGS=""
+ OS_DRIVERS="imbapi.c ipmimv.c ipmidir.c"
+ drivers="imb open direct"
+ SHR_LINK=""
else
- if test $hpux -eq 0; then
- echo "Detected HP-UX"
- os=hpux
- MD2_CFLAGS="-DSKIP_MD2"
- OS_CFLAGS="-DHPUX $MD2_CFLAGS"
- OS_LFLAGS=""
- OS_DRIVERS="ipmimv.c"
- drivers="open"
- SHR_LINK=""
+ if test $bsd -eq 0; then
+ echo "Detected BSD"
+ os=bsd
+ OS_CFLAGS="-DBSD -fPIC"
+ OS_LFLAGS=""
+ OS_DRIVERS="ipmimv.c ipmidir.c"
+ drivers="open direct"
elif test $macos -eq 0; then
echo "Detected MacOSX"
os=macos
MD2_CFLAGS="-DSKIP_MD2"
OS_CFLAGS="-DMACOS $MD2_CFLAGS -fPIC"
OS_LFLAGS=""
- OS_DRIVERS="ipmimv.c ipmidir.c"
- drivers="open direct"
- SHR_LINK=""
- # optionally check for AppleBMC.kext here?
+ OS_DRIVERS="ipmimv.c ipmidir.c"
+ drivers="open direct"
+ SHR_LINK=""
+ # optionally check for AppleBMC.kext here?
else
- # not Solaris, Linux, BSD, or HP-UX = error
+ # not Solaris, Linux, BSD, or HP-UX = error
echo "OS $sysname not yet supported"
exit 1
fi
@@ -443,12 +460,14 @@ fi
dnl determine where the init.d directory is
if test "x$init0" = "x" ; then
if test "x$os" != "xmacos" ; then
- which rpmbuild >/dev/null 2>&1
- if test $? -eq 0 ; then
- init1=`rpmbuild --showrc |grep " _initrddir" | cut -d'}' -f2`
- if test "x$init1" != "x" ; then
- init0=/etc/${init1}
- fi
+ if test "x$os" != "xhpux" ; then
+ which rpmbuild >/dev/null 2>&1
+ if test $? -eq 0 ; then
+ init1=`rpmbuild --showrc |grep " _initrddir" | cut -d'}' -f2`
+ if test "x$init1" != "x" ; then
+ init0=/etc/${init1}
+ fi
+ fi
fi
fi
fi
@@ -492,6 +511,10 @@ if test "x$sysname" = "xSunOS"; then
# -e 's/ipmidir.c/ipmibmc.c/'
cp -f /tmp/make util/Makefile
fi
+if test "x$os" = "xhpux" ; then
+ sed -e 's/^.NOEXPORT:/#.NOEXPORT:/' util/Makefile >/tmp/make
+ cp -f /tmp/make util/Makefile
+fi
AC_MSG_RESULT([])
AC_MSG_RESULT([ipmiutil $VERSION])
diff --git a/debpkg/changelog b/debpkg/changelog
index 6846cd3..61963ed 100644
--- a/debpkg/changelog
+++ b/debpkg/changelog
@@ -1,3 +1,9 @@
+ipmiutil (2.9.7-1) unstable; urgency=low
+
+ * New upstream version.
+
+ -- Andy Cress <arcress@users.sourceforge.net> Mon, 29 Jun 2015 12:04:11 -0400
+
ipmiutil (2.9.6-1) unstable; urgency=low
* New upstream version.
diff --git a/doc/Makefile b/doc/Makefile
index 97d734d..34948f8 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -46,12 +46,12 @@ CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = ${SHELL} /usr/dev/ipmiutil-2.9.6/missing --run aclocal-1.11
-AMTAR = ${SHELL} /usr/dev/ipmiutil-2.9.6/missing --run tar
+ACLOCAL = ${SHELL} /usr/dev/ipmiutil-2.9.7/missing --run aclocal-1.11
+AMTAR = ${SHELL} /usr/dev/ipmiutil-2.9.7/missing --run tar
AR = ar
-AUTOCONF = ${SHELL} /usr/dev/ipmiutil-2.9.6/missing --run autoconf
-AUTOHEADER = ${SHELL} /usr/dev/ipmiutil-2.9.6/missing --run autoheader
-AUTOMAKE = ${SHELL} /usr/dev/ipmiutil-2.9.6/missing --run automake-1.11
+AUTOCONF = ${SHELL} /usr/dev/ipmiutil-2.9.7/missing --run autoconf
+AUTOHEADER = ${SHELL} /usr/dev/ipmiutil-2.9.7/missing --run autoheader
+AUTOMAKE = ${SHELL} /usr/dev/ipmiutil-2.9.7/missing --run automake-1.11
AWK = gawk
CC = gcc
CCDEPMODE = depmode=gcc3
@@ -99,13 +99,13 @@ LIB_DIR = /usr/lib64
LIPO =
LN_S = ln -s
LTLIBOBJS =
-MAKEINFO = ${SHELL} /usr/dev/ipmiutil-2.9.6/missing --run makeinfo
+MAKEINFO = ${SHELL} /usr/dev/ipmiutil-2.9.7/missing --run makeinfo
MKDIR_P = /bin/mkdir -p
NM = /usr/bin/nm -B
NMEDIT =
OBJDUMP = objdump
OBJEXT = o
-OS_CFLAGS = -DLINUX -fPIC -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2
+OS_CFLAGS = -DLINUX -fPIC -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2
OS_DRIVERS = imbapi.c ipmimv.c ipmild.c ipmidir.c
OS_LFLAGS =
OTOOL =
@@ -113,9 +113,9 @@ OTOOL64 =
PACKAGE = ipmiutil
PACKAGE_BUGREPORT =
PACKAGE_NAME = ipmiutil
-PACKAGE_STRING = ipmiutil 2.9.6
+PACKAGE_STRING = ipmiutil 2.9.7
PACKAGE_TARNAME = ipmiutil
-PACKAGE_VERSION = 2.9.6
+PACKAGE_VERSION = 2.9.7
PATH_SEPARATOR = :
PKG_DIR = /root/rpmbuild
RANLIB = ranlib
@@ -123,15 +123,15 @@ SAM2OBJ = isensor2.o ievents2.o
SED = sed
SET_MAKE =
SHELL = /bin/sh
-SHR_LINK = libipmiutil.so
+SHR_LINK = libipmiutil.so.1
STRIP = strip
SUBDIR_S = doc scripts lib util
SYSTEMD_DIR = /usr/share/ipmiutil
-VERSION = 2.9.6
-abs_builddir = /usr/dev/ipmiutil-2.9.6/doc
-abs_srcdir = /usr/dev/ipmiutil-2.9.6/doc
-abs_top_builddir = /usr/dev/ipmiutil-2.9.6
-abs_top_srcdir = /usr/dev/ipmiutil-2.9.6
+VERSION = 2.9.7
+abs_builddir = /usr/dev/ipmiutil-2.9.7/doc
+abs_srcdir = /usr/dev/ipmiutil-2.9.7/doc
+abs_top_builddir = /usr/dev/ipmiutil-2.9.7
+abs_top_srcdir = /usr/dev/ipmiutil-2.9.7
ac_ct_CC = gcc
ac_ct_DUMPBIN =
am__include = include
@@ -159,7 +159,7 @@ host_vendor = redhat
htmldir = ${docdir}
includedir = ${prefix}/include
infodir = ${datarootdir}/info
-install_sh = ${SHELL} /usr/dev/ipmiutil-2.9.6/install-sh
+install_sh = ${SHELL} /usr/dev/ipmiutil-2.9.7/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localedir = ${datarootdir}/locale
diff --git a/doc/UserGuide b/doc/UserGuide
index 213b367..5d25330 100644
--- a/doc/UserGuide
+++ b/doc/UserGuide
@@ -1,6 +1,6 @@
IPMIUTIL USER GUIDE
- VERSION 2.9.6
+ VERSION 2.9.7
An easy-to-use IPMI server management utility
@@ -5227,10 +5227,20 @@ exception of drivers:
or cached at http://ipmiutil.sf.net/kern/imbdrv130.zip
* The Microsoft IPMI driver (ipmidrv.sys), which comes with Windows 2003 R2
and later, is also supported.
-
It should be noted that the two IPMI drivers should not be installed at the
same time, since they will interfere with each other.
-So, for some systems or applications, you may need to uninstall the Microsoft
+
+Note that there are several outstanding bug reports against the Microsoft ipmidrv.sys driver which may affect its usage:
+ * ipmidrv.sys does not support systems with 4-byte register spacing
+ https://social.technet.microsoft.com/forums/windowsserver/en-US/223e3a0d-3daa-4141-9c13-3169f766a7d5/win2008-ipmidrvsys-does-not-load-if-register-spacing-4
+ * ipmidrv.sys WBEM access memory leak
+ https://sourceforge.net/p/ipmiutil/support-requests/11/
+ https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/ca4df181-7fd4-4912-83a0-5896b030e3ca/latest-version-of-microsoft-ipmi-driver-ipmidrvsys?forum=wdk
+ * ipmidrv.sys with Windows 2012 does not work on many IPMI systems
+ This version is more broken than the Win2008 version.
+If you are affected by any of these issues, you can download and install the imbdrv.sys as described below, but you must also disable the MS ipmidrv.sys.
+
+For some systems or applications, you may need to uninstall the Microsoft
IPMI driver, like this:
* start Control Panel/System app
* go to Hardware tab, start Device Manager
@@ -5240,6 +5250,12 @@ IPMI driver, like this:
* select Properties
* on driver tab, click "Uninstall"
* then reboot.
+If you are running Windows 2012, the Device Manager does not support this,
+so use these steps to disable the Microsoft IPMIDRV:
+ * Start a command prompt with 'Run as administrator'
+ * cd \windows\system32\drivers
+ * move ipmidrv.sys ipmidrv.old
+ * then reboot
How to install Intel IPMI driver from the cached copy at http://ipmiutil.sf.net/kern/imbdrv130.zip
Extract imbdrv130.zip to c:\temp or similar
@@ -5263,13 +5279,6 @@ make sure that the Microsoft VC++ Redistributable package is installed
See http://www.microsoft.com/downloads/details.aspx?familyid=200B2FD9-AE1A-4A14-984D-389C36F85647&displaylang=en
to download this if needed.
-Note that there are two outstanding bug reports against the Microsoft ipmidrv.sys driver which may affect its usage:
- * ipmidrv.sys does not support systems with 4-byte register spacing
- https://social.technet.microsoft.com/forums/windowsserver/en-US/223e3a0d-3daa-4141-9c13-3169f766a7d5/win2008-ipmidrvsys-does-not-load-if-register-spacing-4
- * ipmidrv.sys WBEM access memory leak
- https://sourceforge.net/p/ipmiutil/support-requests/11/
- https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/ca4df181-7fd4-4912-83a0-5896b030e3ca/latest-version-of-microsoft-ipmi-driver-ipmidrvsys?forum=wdk
-
----------------------------------
5.2 WINDOWS BUILD INSTRUCTIONS
@@ -5294,14 +5303,14 @@ A copy of these files is available from
http://ipmiutil.sf.net/FILES/ipmiutil-contrib.zip
The above zip contains all of the contributed source used.
Refer to getopt.c from one of these
- BSD getopt.c:
+ BSD getopt.c (used by default in ipmiutil.exe):
http://www.openmash.org/lxr/source/src/getopt.c?c=gsm
public domain getopt.c:
http://www.koders.com/c/fid034963469B932D9D87F91C86680EB08DB4DE9AA3.aspx
GNU LGPL getopt.c:
http://svn.xiph.org/trunk/ogg-tools/oggsplit/
Refer to openssl from this link (Apache-style license, not gpl)
- http://www.openssl.org/source/openssl-0.9.7l.tar.gz.
+ http://www.openssl.org/source/openssl-0.9.8x.tar.gz (used by default)
5.2.3 Copy initial contrib files into ipmiutil
Below are sample directories where ipmiutil*.tar.gz was unpacked,
@@ -5356,8 +5365,9 @@ Serial-Over-LAN requires.
5.3 WINDOWS COMMAND USAGE
----------------------------------
-Because of the differences in Linux getopt and the getopt used in
-the Windows build, the order of parameters is more important in Windows.
+Because of the differences in Linux getopt and the BSD getopt.c used by
+default in the Windows build, the order of parameters is more important
+in Windows.
For example in Linux, the following command usages work, but not in Windows:
# ipmiutil cmd 00 20 18 01 -N 192.168.1.154
diff --git a/doc/ipmiutil.spec b/doc/ipmiutil.spec
index 7cae79d..fdb25c3 100644
--- a/doc/ipmiutil.spec
+++ b/doc/ipmiutil.spec
@@ -3,7 +3,7 @@
# Copyright (c) 2012 Andy Cress
#
Name: ipmiutil
-Version: 2.9.6
+Version: 2.9.7
Release: 1%{?dist}
Summary: Easy-to-use IPMI server management utilities
License: BSD
@@ -115,6 +115,7 @@ rm -rf %{buildroot}
%{_sbindir}/ifirewall
%{_sbindir}/ifwum
%{_sbindir}/ihpm
+%{_libdir}/libipmiutil.so*
%{_datadir}/%{name}/ipmiutil_evt
%{_datadir}/%{name}/ipmiutil_asy
%{_datadir}/%{name}/ipmiutil_wdt
@@ -174,7 +175,6 @@ rm -rf %{buildroot}
%{_datadir}/%{name}/ievents.h
%{_datadir}/%{name}/Makefile
%{_includedir}/ipmicmd.h
-%{_libdir}/libipmiutil.so
%files static
%defattr(-,root,root)
@@ -186,6 +186,7 @@ rm -rf %{buildroot}
%endif
%post
+/sbin/ldconfig
# POST_INSTALL, $1 = 1 if rpm -i, $1 = 2 if rpm -U
if [ "$1" = "1" ]
then
@@ -213,8 +214,8 @@ then
%endif
# Run some ipmiutil command to see if any IPMI interface works.
- %{_bindir}/ipmiutil sel -v >/dev/null 2>&1 || :
- IPMIret=$?
+ IPMIret=0
+ %{_bindir}/ipmiutil sel -v >/dev/null 2>&1 || IPMIret=1
# If IPMIret==0, the IPMI cmd was successful, and IPMI is enabled locally.
if [ $IPMIret -eq 0 ]; then
# If IPMI is enabled, automate managing the IPMI SEL
@@ -245,8 +246,9 @@ then
fi
else
# postinstall, doing rpm update
- %{_bindir}/ipmiutil sel -v >/dev/null 2>&1 || :
- if [ $? -eq 0 ]; then
+ IPMIret=0
+ %{_bindir}/ipmiutil sel -v >/dev/null 2>&1 || IPMIret=1
+ if [ $IPMIret -eq 0 ]; then
if [ -d %{_sysconfdir}/cron.daily ]; then
cp -f %{_datadir}/%{name}/checksel %{_sysconfdir}/cron.daily
fi
@@ -305,6 +307,7 @@ then
fi
%postun
+/sbin/ldconfig
%if 0%{?req_systemd}
%service_del_postun ipmi_port.service ipmiutil_evt.service ipmiutil_asy.service ipmiutil_wdt.service
%else
@@ -335,6 +338,8 @@ fi
%endif
%changelog
+* Mon Jun 29 2015 Andrew Cress <arcress at users.sourceforge.net> 2.9.7-1
+- move libipmiutil.so from devel into ipmiutil base package (RH#1177213)
* Mon Nov 03 2014 Andrew Cress <arcress at users.sourceforge.net> 2.9.5-1
- separate libipmiutil.a into ipmiutil-static package
* Thu Aug 28 2014 Andrew Cress <arcress at users.sourceforge.net> 2.9.4-1
diff --git a/doc/isol.8 b/doc/isol.8
index d2e594c..8aacbe0 100644
--- a/doc/isol.8
+++ b/doc/isol.8
@@ -113,6 +113,71 @@ ipmiutil sol \-a \-N nodename \-U username \-P password \-Flan2
Starts an SOL console session to the nodename. Force lan protocol to 2.0.
.PP
+.SH "PLATFORM SERIAL PORT CONFIGURATION EXAMPLES"
+
+First, enter BIOS Setup for Serial Console Redirection parameters:
+(these vary by platform)
+.br
+ Console Redirection = Serial Port B
+.br
+ ACPI Redirection = Disabled
+.br
+ Baud Rate = 115.2K
+.br
+ Flow Control = CTS/RTS
+.br
+ Terminal Type = VT100
+.br
+ Legacy Redirection = Enabled
+.br
+Note that the Baud Rate can vary, but it must match in all
+locations where it is used (BIOS, IPMI, and Linux).
+.br
+For some non-Intel platforms, the serial console would be
+COM1 instead of COM2, but should be enabled in BIOS.
+.br
+From Linux, run "ipmiutil serial \-c" for Terminal Mode shared configuration.
+.br
+Or, on older Intel TSRLT2 platforms:
+From Linux, run "ipmiutil serial \-s" for Basic Mode Shared configuration.
+
+.SH "LINUX CONFIGURATION FOR SERIAL CONSOLE"
+
+If using lilo, in /etc/lilo.conf, add
+.br
+ append="console=ttyS1,19200n8 console=tty0"
+.br
+(and comment out the "message=" line because it includes graphics)
+.br
+Note that the append line can be placed in the global section
+and removed from each kernel section if there are no other differences.
+
+.PP
+Or, if using grub, edit /boot/grub/grub.conf as follows:
+.br
+ #Omit the splashimage or gfxmenu
+.br
+ # splashimage=(hd0,0)/grub/splash.xpm.gz
+.br
+ #The serial and terminal lines are not usually needed
+.br
+ # serial \-\-unit=1 \-\-speed=19200 \-\-word=8 \-\-parity=no \-\-stop=1
+.br
+ # terminal \-\-timeout=10 serial console
+.br
+ #Add the console=ttyS* parameter to the kernel line
+.br
+ kernel (hd0,0) /vmlinuz root=/dev/sda2 console=ttyS1,19200n8
+
+.PP
+Add this line to /etc/initab, if ttyS1 is not already there:
+.br
+ co:2345:respawn:/sbin/agetty ttyS1 19200 vt100
+.PP
+Add this line to /etc/securetty, if ttyS1 is not already there:
+.br
+ ttyS1
+
.SH "SEE ALSO"
ipmiutil(8) ialarms(8) iconfig(8) icmd(8) idiscover(8) ievents(8) ifru(8) igetevent(8) ihealth(8) ilan(8) ireset(8) isel(8) isensor(8) iserial(8) iwdt(8)
diff --git a/lib/Makefile b/lib/Makefile
index f463803..78d967d 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -47,12 +47,12 @@ CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = ${SHELL} /usr/dev/ipmiutil-2.9.6/missing --run aclocal-1.11
-AMTAR = ${SHELL} /usr/dev/ipmiutil-2.9.6/missing --run tar
+ACLOCAL = ${SHELL} /usr/dev/ipmiutil-2.9.7/missing --run aclocal-1.11
+AMTAR = ${SHELL} /usr/dev/ipmiutil-2.9.7/missing --run tar
AR = ar
-AUTOCONF = ${SHELL} /usr/dev/ipmiutil-2.9.6/missing --run autoconf
-AUTOHEADER = ${SHELL} /usr/dev/ipmiutil-2.9.6/missing --run autoheader
-AUTOMAKE = ${SHELL} /usr/dev/ipmiutil-2.9.6/missing --run automake-1.11
+AUTOCONF = ${SHELL} /usr/dev/ipmiutil-2.9.7/missing --run autoconf
+AUTOHEADER = ${SHELL} /usr/dev/ipmiutil-2.9.7/missing --run autoheader
+AUTOMAKE = ${SHELL} /usr/dev/ipmiutil-2.9.7/missing --run automake-1.11
AWK = gawk
CC = gcc
CCDEPMODE = depmode=gcc3
@@ -101,13 +101,13 @@ LIB_DIR = /usr/lib64
LIPO =
LN_S = ln -s
LTLIBOBJS =
-MAKEINFO = ${SHELL} /usr/dev/ipmiutil-2.9.6/missing --run makeinfo
+MAKEINFO = ${SHELL} /usr/dev/ipmiutil-2.9.7/missing --run makeinfo
MKDIR_P = /bin/mkdir -p
NM = /usr/bin/nm -B
NMEDIT =
OBJDUMP = objdump
OBJEXT = o
-OS_CFLAGS = -DLINUX -fPIC -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2
+OS_CFLAGS = -DLINUX -fPIC -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2
OS_DRIVERS = imbapi.c ipmimv.c ipmild.c ipmidir.c
OS_LFLAGS =
OTOOL =
@@ -115,9 +115,9 @@ OTOOL64 =
PACKAGE = ipmiutil
PACKAGE_BUGREPORT =
PACKAGE_NAME = ipmiutil
-PACKAGE_STRING = ipmiutil 2.9.6
+PACKAGE_STRING = ipmiutil 2.9.7
PACKAGE_TARNAME = ipmiutil
-PACKAGE_VERSION = 2.9.6
+PACKAGE_VERSION = 2.9.7
PATH_SEPARATOR = :
PKG_DIR = /root/rpmbuild
RANLIB = ranlib
@@ -125,15 +125,15 @@ SAM2OBJ = isensor2.o ievents2.o
SED = sed
SET_MAKE =
SHELL = /bin/sh
-SHR_LINK = libipmiutil.so
+SHR_LINK = libipmiutil.so.1
STRIP = strip
SUBDIR_S = doc scripts lib util
SYSTEMD_DIR = /usr/share/ipmiutil
-VERSION = 2.9.6
-abs_builddir = /usr/dev/ipmiutil-2.9.6/lib
-abs_srcdir = /usr/dev/ipmiutil-2.9.6/lib
-abs_top_builddir = /usr/dev/ipmiutil-2.9.6
-abs_top_srcdir = /usr/dev/ipmiutil-2.9.6
+VERSION = 2.9.7
+abs_builddir = /usr/dev/ipmiutil-2.9.7/lib
+abs_srcdir = /usr/dev/ipmiutil-2.9.7/lib
+abs_top_builddir = /usr/dev/ipmiutil-2.9.7
+abs_top_srcdir = /usr/dev/ipmiutil-2.9.7
ac_ct_CC = gcc
ac_ct_DUMPBIN =
am__include = include
@@ -161,7 +161,7 @@ host_vendor = redhat
htmldir = ${docdir}
includedir = ${prefix}/include
infodir = ${datarootdir}/info
-install_sh = ${SHELL} /usr/dev/ipmiutil-2.9.6/install-sh
+install_sh = ${SHELL} /usr/dev/ipmiutil-2.9.7/install-sh
libdir = $(iprefix)/lib
libexecdir = ${exec_prefix}/libexec
localedir = ${datarootdir}/locale
diff --git a/lib/lanplus/inc/ipmitool/ipmi_sdr.h b/lib/lanplus/inc/ipmitool/ipmi_sdr.h
index 65b5a8c..b0b9a03 100644
--- a/lib/lanplus/inc/ipmitool/ipmi_sdr.h
+++ b/lib/lanplus/inc/ipmitool/ipmi_sdr.h
@@ -281,7 +281,7 @@ struct sdr_record_mask {
uint16_t settable:8;
#endif
} read;
- };
+ } mask;
} threshold;
} type;
} __attribute__ ((packed));
diff --git a/lib/lanplus/lanplus.c b/lib/lanplus/lanplus.c
index b695837..2fab966 100644
--- a/lib/lanplus/lanplus.c
+++ b/lib/lanplus/lanplus.c
@@ -153,7 +153,7 @@ static void ack_sol_packet(
static uint8_t bridgePossible = 0;
-#if defined(WIN32) || defined(SOLARIS)
+#if defined(WIN32) || defined(SOLARIS) || defined(HPUX)
struct ipmi_intf ipmi_lanplus_intf;
void ipmilanplus_init(struct ipmi_intf *intf)
{
@@ -690,7 +690,7 @@ ipmiv2_lan_ping(struct ipmi_intf * intf)
{
uint8_t * data;
int rv;
-#if defined(WIN32) || defined(SOLARIS)
+#if defined(WIN32) || defined(SOLARIS) || defined(HPUX)
struct asf_hdr asf_ping;
struct rmcp_hdr rmcp_ping;
int len = sizeof(rmcp_ping) + sizeof(asf_ping);
@@ -1763,7 +1763,7 @@ ipmi_lanplus_build_v2x_msg(
uint8_t * msg;
int len = 0;
int rv = 0;
-#if defined(WIN32) || defined(SOLARIS)
+#if defined(WIN32) || defined(SOLARIS) || defined(HPUX)
struct rmcp_hdr rmcp;
rmcp.ver = RMCP_VERSION_1;
@@ -2173,7 +2173,7 @@ ipmi_lanplus_build_v15_ipmi_cmd(
int cs, mp, len = 0, tmp;
struct ipmi_session * session = intf->session;
struct ipmi_rq_entry * entry;
-#if defined(WIN32) || defined(SOLARIS)
+#if defined(WIN32) || defined(SOLARIS) || defined(HPUX)
struct rmcp_hdr rmcp;
rmcp.ver = RMCP_VERSION_1;
@@ -3861,7 +3861,7 @@ ipmi_lanplus_open(struct ipmi_intf * intf)
#ifdef HAVE_IPV6
lan2_nodename[0] = 0;
- lprintf(LOG_ERROR,"Connected to node %s\n", session->hostname);
+ lprintf(LOG_NOTICE,"Connected to node %s\n", session->hostname);
#else
#ifdef WIN32
/* check for ws2_32.lib(getnameinfo) resolution */
@@ -3875,7 +3875,7 @@ ipmi_lanplus_open(struct ipmi_intf * intf)
}
#endif
temp = inet_ntoa(addr.sin_addr);
- lprintf(LOG_ERROR,"Connected to node %s %s\n",lan2_nodename,temp);
+ lprintf(LOG_NOTICE,"Connected to node %s %s\n",lan2_nodename,temp);
#endif
return (int)(intf->fd);
diff --git a/lib/lanplus/lanplus_crypt_impl.c b/lib/lanplus/lanplus_crypt_impl.c
index 3f9679e..d12ad9c 100644
--- a/lib/lanplus/lanplus_crypt_impl.c
+++ b/lib/lanplus/lanplus_crypt_impl.c
@@ -61,13 +61,20 @@ int lanplus_seed_prng(uint32_t bytes)
static FILE *fp = NULL;
size_t i;
randfile = RAND_file_name(buffer, sizeof buffer); /* usu C:\.rnd */
- if ((randfile != NULL) && (fp == NULL)) {
- /*first time, so open/create file*/
- fp = fopen(randfile,"w"); /*create the randfile*/
- if (fp != NULL) {
- i = fwrite(" \n",2,1,fp);
- fclose(fp);
- }
+ if ((randfile != NULL) && (fp == NULL)) {
+ fp = fopen(randfile,"r"); /*check the randfile*/
+ if (fp == NULL) { /*does not exist, create it*/
+ /*first time, so open/create file*/
+ fp = fopen(randfile,"w"); /*create the randfile*/
+ if (fp != NULL) {
+ i = fwrite(" \n",2,1,fp);
+ fclose(fp);
+ } else {
+ printf("seed_prng: cannot create %s file\n",randfile);
+ }
+ } else { /*file opened, so close it*/
+ fclose(fp);
+ }
}
if (verbose > 0)
printf("seed_prng: RAND_file_name = %s, fp=%p\n",randfile,fp);
diff --git a/lib/lanplus/lanplus_defs.h b/lib/lanplus/lanplus_defs.h
index dbce90d..2ba35b7 100644
--- a/lib/lanplus/lanplus_defs.h
+++ b/lib/lanplus/lanplus_defs.h
@@ -38,10 +38,13 @@
#if defined(HAVE_CONFIG_H)
#include "config.h"
#else
+#ifndef HPUX
+/* HPUX already has socklen_t but no #define */
#ifndef socklen_t
typedef unsigned int socklen_t;
#endif
#endif
+#endif
#if defined(MACOS)
diff --git a/lib/libipmiutil.pc b/lib/libipmiutil.pc
index c12afe1..a952285 100644
--- a/lib/libipmiutil.pc
+++ b/lib/libipmiutil.pc
@@ -8,6 +8,6 @@ nutuser=@RUN_AS_USER@
Name: libipmiutil
Description: Library for ipmiutil
-Version: 2.9.6
+Version: 2.9.7
Libs: -L${libdir} -lipmi_lanplus
Cflags: -I${includedir}
diff --git a/scripts/Makefile b/scripts/Makefile
index 8fe0f86..fc29dd3 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -46,12 +46,12 @@ CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = ${SHELL} /usr/dev/ipmiutil-2.9.6/missing --run aclocal-1.11
-AMTAR = ${SHELL} /usr/dev/ipmiutil-2.9.6/missing --run tar
+ACLOCAL = ${SHELL} /usr/dev/ipmiutil-2.9.7/missing --run aclocal-1.11
+AMTAR = ${SHELL} /usr/dev/ipmiutil-2.9.7/missing --run tar
AR = ar
-AUTOCONF = ${SHELL} /usr/dev/ipmiutil-2.9.6/missing --run autoconf
-AUTOHEADER = ${SHELL} /usr/dev/ipmiutil-2.9.6/missing --run autoheader
-AUTOMAKE = ${SHELL} /usr/dev/ipmiutil-2.9.6/missing --run automake-1.11
+AUTOCONF = ${SHELL} /usr/dev/ipmiutil-2.9.7/missing --run autoconf
+AUTOHEADER = ${SHELL} /usr/dev/ipmiutil-2.9.7/missing --run autoheader
+AUTOMAKE = ${SHELL} /usr/dev/ipmiutil-2.9.7/missing --run automake-1.11
AWK = gawk
CC = gcc
CCDEPMODE = depmode=gcc3
@@ -99,13 +99,13 @@ LIB_DIR = /usr/lib64
LIPO =
LN_S = ln -s
LTLIBOBJS =
-MAKEINFO = ${SHELL} /usr/dev/ipmiutil-2.9.6/missing --run makeinfo
+MAKEINFO = ${SHELL} /usr/dev/ipmiutil-2.9.7/missing --run makeinfo
MKDIR_P = /bin/mkdir -p
NM = /usr/bin/nm -B
NMEDIT =
OBJDUMP = objdump
OBJEXT = o
-OS_CFLAGS = -DLINUX -fPIC -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2
+OS_CFLAGS = -DLINUX -fPIC -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2
OS_DRIVERS = imbapi.c ipmimv.c ipmild.c ipmidir.c
OS_LFLAGS =
OTOOL =
@@ -113,9 +113,9 @@ OTOOL64 =
PACKAGE = ipmiutil
PACKAGE_BUGREPORT =
PACKAGE_NAME = ipmiutil
-PACKAGE_STRING = ipmiutil 2.9.6
+PACKAGE_STRING = ipmiutil 2.9.7
PACKAGE_TARNAME = ipmiutil
-PACKAGE_VERSION = 2.9.6
+PACKAGE_VERSION = 2.9.7
PATH_SEPARATOR = :
PKG_DIR = /root/rpmbuild
RANLIB = ranlib
@@ -123,15 +123,15 @@ SAM2OBJ = isensor2.o ievents2.o
SED = sed
SET_MAKE =
SHELL = /bin/sh
-SHR_LINK = libipmiutil.so
+SHR_LINK = libipmiutil.so.1
STRIP = strip
SUBDIR_S = doc scripts lib util
SYSTEMD_DIR = /usr/share/ipmiutil
-VERSION = 2.9.6
-abs_builddir = /usr/dev/ipmiutil-2.9.6/scripts
-abs_srcdir = /usr/dev/ipmiutil-2.9.6/scripts
-abs_top_builddir = /usr/dev/ipmiutil-2.9.6
-abs_top_srcdir = /usr/dev/ipmiutil-2.9.6
+VERSION = 2.9.7
+abs_builddir = /usr/dev/ipmiutil-2.9.7/scripts
+abs_srcdir = /usr/dev/ipmiutil-2.9.7/scripts
+abs_top_builddir = /usr/dev/ipmiutil-2.9.7
+abs_top_srcdir = /usr/dev/ipmiutil-2.9.7
ac_ct_CC = gcc
ac_ct_DUMPBIN =
am__include = include
@@ -159,7 +159,7 @@ host_vendor = redhat
htmldir = ${docdir}
includedir = ${prefix}/include
infodir = ${datarootdir}/info
-install_sh = ${SHELL} /usr/dev/ipmiutil-2.9.6/install-sh
+install_sh = ${SHELL} /usr/dev/ipmiutil-2.9.7/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localedir = ${datarootdir}/locale
diff --git a/setver b/setver
index 87237fc..2e59ec2 100755
--- a/setver
+++ b/setver
@@ -6,7 +6,7 @@
# [doinc?] is 'n'.
# if [doinc?] is 'r', reverse increment (decrement).
#
-ver=2.9.6
+ver=2.9.7
rel=1
tmped=/tmp/edver.tmp
tmpspec=/tmp/edspec.tmp
diff --git a/test/testipmi.sh b/test/testipmi.sh
index 798705a..3ab0ccf 100755
--- a/test/testipmi.sh
+++ b/test/testipmi.sh
@@ -13,7 +13,7 @@ outf=/tmp/testipmi.out
remote=0
dosol=0
# default remote node for SOL test
-node=192.168.1.154
+node=192.168.134.52
# use canned username and password, edit as needed.
user=admin
pswd=password
diff --git a/util/Makefile.am b/util/Makefile.am
index 16a8665..c3312ac 100644
--- a/util/Makefile.am
+++ b/util/Makefile.am
@@ -59,8 +59,11 @@ LANPLUS_OBJ = $(shell ar t @LANPLUS_LIB@ 2>/dev/null)
bin_PROGRAMS = ipmiutil ievents idiscover
sbin_PROGRAMS = ipmi_port iseltime
DEV_LIB = libipmiutil.a
-SHR_LIB = libipmiutil.so
+# SHRLINK is libipmiutil.so.1 if OS supports it
SHRLINK = @SHR_LINK@
+SHR_LIB = $(SHRLINK)
+SHR_BLIB = libipmiutil.so
+LDNAME = -Wl,-soname,$(SHR_LIB)
EXTRA_PROGRAMS = ipmi_sample ipmi_sample_evt
TESTPROGS = libimbapi.a iconfig ipmimv ifruset ipmi_sample2 ialarms_enc
# OLDPROGS are old/previous binaries that may exist and need to be deleted.
@@ -98,13 +101,16 @@ $(SHR_LIB): $(CMDMOD:.c=.o) @LANPLUS_LIB@ @LIBSENSORS@
$(CC) $(CFLAGS_SAMX) -o $(tmpobj)/ipmilanplus.o -c ipmilanplus.c; \
$(CC) $(CFLAGS_SAMX) -o $(tmpobj)/ipmilan.o -c ipmilan.c; \
ar x @LANPLUS_LIB@ ; \
- $(CC) $(LDFLAGS) -shared -o $(SHR_LIB) $(LIBOBJ) $(LANPLUS_OBJ); \
+ $(CC) $(LDFLAGS) -shared $(LDNAME) -o $(SHR_LIB) $(LIBOBJ) $(LANPLUS_OBJ); \
else \
$(CC) $(CFLAGS_SAM) -o $(tmpobj)/ipmilanplus.o -c ipmilanplus.c; \
$(CC) $(CFLAGS_SAM) -o $(tmpobj)/ipmilan.o -c ipmilan.c; \
- $(CC) $(LDFLAGS) -shared -o $(SHR_LIB) $(LIBOBJ) ; \
+ $(CC) $(LDFLAGS) -shared $(LDNAME) -o $(SHR_LIB) $(LIBOBJ) ; \
fi
+$(SHR_BLIB): $(SHR_LIB)
+ ln -s $(SHR_LIB) $(SHR_BLIB)
+
# To build ipmiutil, need to use METACFLAGS for each .c/.o
idiscover$(EXEEXT): idiscover.c
@@ -180,7 +186,7 @@ EXTRA_DIST = imb_api.h ipmicmd.h ipmidir.h ipmilan.h ipmilanplus.h AnsiTerm.h i
all-am: Makefile $(bin_PROGRAMS) $(sbin_PROGRAMS) $(EXTRA_PROGRAMS) $(DEV_LIB) $(SHRLINK)
-install-data-am: $(EXTRA_PROGRAMS) $(DEV_LIB) $(SHRLINK)
+install-data-am: $(EXTRA_PROGRAMS) $(DEV_LIB) $(SHRLINK)
@INS_LIB@ mkdir -p $(DESTDIR)$(extradir)
@INS_LIB@ mkdir -p $(DESTDIR)$(LIBDIR)
@INS_LIB@ mkdir -p $(DESTDIR)$(inc_dir)
@@ -191,10 +197,10 @@ install-data-am: $(EXTRA_PROGRAMS) $(DEV_LIB) $(SHRLINK)
@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)
- if [ "x$(SHRLINK)" != "x" ]; then \
- touch $(SHRLINK) ; \
- @INS_LIB@ cp -f $(SHR_LIB) $(DESTDIR)$(LIBDIR) ; \
- fi
+ @INS_LIB@ if [ "x$(SHRLINK)" != "x" ]; then \
+ @INS_LIB@ cp -f $(SHRLINK) $(DESTDIR)$(LIBDIR) ; \
+ @INS_LIB@ cd $(DESTDIR); ln -sf $(LIBDIR)/$(SHRLINK) $(DESTDIR)$(LIBDIR)/$(SHR_BLIB); \
+ @INS_LIB@ fi
clean-generic:
rm -f $(DEV_LIB) $(EXTRA_PROGRAMS) $(OLDPROGS) $(TESTPROGS) $(SHRLINK)
diff --git a/util/Makefile.in b/util/Makefile.in
index 466c530..a745663 100644
--- a/util/Makefile.in
+++ b/util/Makefile.in
@@ -299,8 +299,11 @@ L2OBJ = @SAM2OBJ@
METASOURCE = ipmiutil.c ialarms.c ihealth.c ievents.c ifru.c ifru_picmg.c igetevent.c ireset.c icmd.c ilan.c isensor.c isel.c iserial.c iwdt.c isol.c idiscover.c iconfig.c ipicmg.c ifirewall.c ifwum.c ihpm.c itsol.c idcmi.c $(OEMMOD) $(CMDMOD)
LANPLUS_OBJ = $(shell ar t @LANPLUS_LIB@ 2>/dev/null)
DEV_LIB = libipmiutil.a
-SHR_LIB = libipmiutil.so
+# SHRLINK is libipmiutil.so.1 if OS supports it
SHRLINK = @SHR_LINK@
+SHR_LIB = $(SHRLINK)
+SHR_BLIB = libipmiutil.so
+LDNAME = -Wl,-soname,$(SHR_LIB)
TESTPROGS = libimbapi.a iconfig ipmimv ifruset ipmi_sample2 ialarms_enc
# 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
@@ -745,13 +748,16 @@ $(SHR_LIB): $(CMDMOD:.c=.o) @LANPLUS_LIB@ @LIBSENSORS@
$(CC) $(CFLAGS_SAMX) -o $(tmpobj)/ipmilanplus.o -c ipmilanplus.c; \
$(CC) $(CFLAGS_SAMX) -o $(tmpobj)/ipmilan.o -c ipmilan.c; \
ar x @LANPLUS_LIB@ ; \
- $(CC) $(LDFLAGS) -shared -o $(SHR_LIB) $(LIBOBJ) $(LANPLUS_OBJ); \
+ $(CC) $(LDFLAGS) -shared $(LDNAME) -o $(SHR_LIB) $(LIBOBJ) $(LANPLUS_OBJ); \
else \
$(CC) $(CFLAGS_SAM) -o $(tmpobj)/ipmilanplus.o -c ipmilanplus.c; \
$(CC) $(CFLAGS_SAM) -o $(tmpobj)/ipmilan.o -c ipmilan.c; \
- $(CC) $(LDFLAGS) -shared -o $(SHR_LIB) $(LIBOBJ) ; \
+ $(CC) $(LDFLAGS) -shared $(LDNAME) -o $(SHR_LIB) $(LIBOBJ) ; \
fi
+$(SHR_BLIB): $(SHR_LIB)
+ ln -s $(SHR_LIB) $(SHR_BLIB)
+
# To build ipmiutil, need to use METACFLAGS for each .c/.o
idiscover$(EXEEXT): idiscover.c
@@ -816,7 +822,7 @@ ipmiutil$(EXEEXT): $(METASOURCE:.c=.o) @LANPLUS_LIB@
all-am: Makefile $(bin_PROGRAMS) $(sbin_PROGRAMS) $(EXTRA_PROGRAMS) $(DEV_LIB) $(SHRLINK)
-install-data-am: $(EXTRA_PROGRAMS) $(DEV_LIB) $(SHRLINK)
+install-data-am: $(EXTRA_PROGRAMS) $(DEV_LIB) $(SHRLINK)
@INS_LIB@ mkdir -p $(DESTDIR)$(extradir)
@INS_LIB@ mkdir -p $(DESTDIR)$(LIBDIR)
@INS_LIB@ mkdir -p $(DESTDIR)$(inc_dir)
@@ -827,10 +833,10 @@ install-data-am: $(EXTRA_PROGRAMS) $(DEV_LIB) $(SHRLINK)
@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)
- if [ "x$(SHRLINK)" != "x" ]; then \
- touch $(SHRLINK) ; \
- @INS_LIB@ cp -f $(SHR_LIB) $(DESTDIR)$(LIBDIR) ; \
- fi
+ @INS_LIB@ if [ "x$(SHRLINK)" != "x" ]; then \
+ @INS_LIB@ cp -f $(SHRLINK) $(DESTDIR)$(LIBDIR) ; \
+ @INS_LIB@ cd $(DESTDIR); ln -sf $(LIBDIR)/$(SHRLINK) $(DESTDIR)$(LIBDIR)/$(SHR_BLIB); \
+ @INS_LIB@ fi
clean-generic:
rm -f $(DEV_LIB) $(EXTRA_PROGRAMS) $(OLDPROGS) $(TESTPROGS) $(SHRLINK)
diff --git a/util/getopt.h-win32 b/util/getopt.h-win32
new file mode 100644
index 0000000..62fe3dd
--- /dev/null
+++ b/util/getopt.h-win32
@@ -0,0 +1,40 @@
+/*
+ * getopt.h
+ *
+ * 07/13/07 ARCress - created.
+ *
+ Copyright (c) 2007 Andy Cress <arcress at users.sourceforge.net>
+ BSD-3-clause
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ a. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+ b. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+ c. Neither the name of Kontron, nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef _GETOPT_H_
+#define _GETOPT_H_
+
+extern int getopt(int argc, char **argv, char *opts);
+
+extern int optind;
+extern int optopt;
+extern int opterr;
+extern char *optarg;
+
+#endif
diff --git a/util/ialarms.c b/util/ialarms.c
index 68f69b4..e13960b 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.96";
+static char * progver = "2.97";
static char * progname = "ialarms";
static char fdebug = 0;
static char fbmctam = 0;
diff --git a/util/icmd.c b/util/icmd.c
index c12de8a..4472879 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.96";
+static char * progver = "2.97";
static char * progname = "icmd";
static char fdebug = 0;
static char fquiet = 0;
diff --git a/util/iconfig.c b/util/iconfig.c
index 6bdb104..ea2b65d 100644
--- a/util/iconfig.c
+++ b/util/iconfig.c
@@ -171,7 +171,7 @@ typedef struct
/*
* Global variables
*/
-static char * progver = "2.96";
+static char * progver = "2.97";
static char * progname = "iconfig";
static char fdebug = 0;
static char fipmilan = 0;
@@ -392,7 +392,7 @@ static struct {
#define DCMI_CONFIG 0x05 /*DCMI Config params*/
static int GetDeviceID(uchar *pLanRecord)
-{
+{ /*See also ipmi_getdeviceid( pLanRecord, sizeof(LAN_RECORD),fdebug); */
uchar responseData[MAX_BUFFER_SIZE];
int responseLength = MAX_BUFFER_SIZE;
int status;
diff --git a/util/idcmi.c b/util/idcmi.c
index 9ab1c82..173e55a 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.96";
+static char * progver = "2.97";
extern char fdebug; /*from ipmicmd.c*/
static uchar g_bus = PUBLIC_BUS;
static uchar g_sa = BMC_SA;
diff --git a/util/idiscover.c b/util/idiscover.c
index 57471e3..6dd0225 100644
--- a/util/idiscover.c
+++ b/util/idiscover.c
@@ -117,10 +117,14 @@ static char frawok = 0; /*raw not working in Solaris*/
#define RAW_DOMAIN AF_INET
#define RAW_PROTO IPPROTO_RAW
static char frawok = 0; /*raw not working in FreeBSD*/
+#elif HPUX
+#define RAW_DOMAIN AF_INET
+#define RAW_PROTO IPPROTO_RAW
+static char frawok = 0; /*raw not working in HPUX*/
#elif MACOS
#define RAW_DOMAIN AF_INET
#define RAW_PROTO IPPROTO_RAW
-static char frawok = 0; /*raw not working in FreeBSD*/
+static char frawok = 0; /*raw not working in MacOS*/
#elif WIN32
#define RAW_DOMAIN AF_INET
#define RAW_PROTO IPPROTO_ICMP
@@ -153,7 +157,7 @@ int GetFirstIP(uchar *ipaddr, uchar *macadr, char *ipname, char fdb); /*ilan.c*/
/*
* Global variables
*/
-static char * progver = "1.9";
+static char * progver = "1.10";
static char * progname = "idiscover";
static char fdebug = 0;
static char fping = 1;
@@ -387,7 +391,7 @@ int inet_aton(const char *cp, struct in_addr *inp)
else rv = 1; /*success*/
return(rv);
}
-#elif defined(SOLARIS)
+#elif defined(SOLARIS) || defined(HPUX)
int find_ifname(char *ifname)
{ return(-1); }
#else
@@ -398,15 +402,15 @@ int find_ifname(char *ifname)
int rv = -1;
if (getifaddrs(&ifaddr) == -1) return(rv);
for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) {
- if (ifa->ifa_addr == NULL) continue;
- if ((ifa->ifa_addr->sa_family != AF_INET) &&
- (ifa->ifa_addr->sa_family != AF_INET6)) continue;
- if (strcmp(ifa->ifa_name,"lo") == 0) continue;
- /* if here, we have a valid ifname */
- strcpy(ifname,ifa->ifa_name);
- if (fdebug) printf("find_ifname: found %s\n",ifname);
- rv = 0;
- break;
+ if (ifa->ifa_addr == NULL) continue;
+ if ((ifa->ifa_addr->sa_family != AF_INET) &&
+ (ifa->ifa_addr->sa_family != AF_INET6)) continue;
+ if (strcmp(ifa->ifa_name,"lo") == 0) continue;
+ /* if here, we have a valid ifname */
+ strcpy(ifname,ifa->ifa_name);
+ if (fdebug) printf("find_ifname: found %s\n",ifname);
+ rv = 0;
+ break;
}
freeifaddrs(ifaddr);
return(rv);
@@ -483,7 +487,7 @@ int sock_init( char *_interface, char *_startIP, char *_endIP)
n = find_ifname(devname);
if (n >= 0) {
_interface = devname;
- findif = 0;
+ findif = 0; /*found, do not find again below */
}
}
if (findif)
@@ -630,10 +634,10 @@ void *receiveThread(void *p)
if ((g_sockraw = socket(RAW_DOMAIN, SOCK_RAW,RAW_PROTO)) == SockInvalid)
{
printerr("raw socket: %s\n", showlasterr());
- fraw = 0;
+ fraw = 0;
} else {
- sockrecv = g_sockraw;
- if (fdebug) printf("g_sockraw = %d\n",g_sockraw);
+ sockrecv = g_sockraw;
+ if (fdebug) printf("g_sockraw = %d\n",g_sockraw);
}
}
@@ -1011,7 +1015,7 @@ main(int argc, char **argv)
#endif
if (fraw == 1) {
if (frawok == 0) {
- printf("Warning: SOCK_RAW not yet implemented on this OS\n");
+ printf("Warning: SOCK_RAW not yet implemented on this OS\n");
}
#ifdef LINUX
else {
diff --git a/util/ievents.c b/util/ievents.c
index f0034b2..dcef599 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.96";
+static char *progver = "2.97";
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 f9da95d..9a9fa25 100644
--- a/util/ifirewall.c
+++ b/util/ifirewall.c
@@ -64,7 +64,7 @@
/* global variables */
static char * progname = "ifirewall";
-static char * progver = "2.96";
+static char * progver = "2.97";
static char fdebug = 0;
static uchar g_bus = PUBLIC_BUS;
static uchar g_sa = BMC_SA;
diff --git a/util/ifirewall.h b/util/ifirewall.h
index 3953b09..b442745 100644
--- a/util/ifirewall.h
+++ b/util/ifirewall.h
@@ -96,7 +96,7 @@ struct ipmi_function_params {
unsigned char force;
};
-#ifdef WIN32
+#if defined(WIN32) || defined(HPUX)
#define INLINE /*nop*/
#else
#define INLINE inline
diff --git a/util/ifru.c b/util/ifru.c
index 5b5192f..61a19f3 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.96";
+static char *progver = "2.97";
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 472b71f..f8beada 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.96";
+static char *progver = "2.97";
static char fdebug = 0;
static char fpicmg = 0;
static char fonlybase = 0;
diff --git a/util/igetevent.c b/util/igetevent.c
index 96f5442..25d0d8e 100644
--- a/util/igetevent.c
+++ b/util/igetevent.c
@@ -113,6 +113,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <fcntl.h>
#if defined(HPUX)
/* getopt is defined in stdio.h */
+#include <limits.h> /* for _SC_OPEN_MAX, usu 1024. */
#elif defined(MACOS)
/* getopt is defined in unistd.h */
#include <unistd.h>
@@ -168,7 +169,7 @@ extern void free_sdr_cache(uchar *pret); /*see isensor.c*/
* Global variables
*/
static char * progname = "igetevent";
-static char * progver = "2.96";
+static char * progver = "2.97";
static char fdebug = 0;
static char fipmilan = 0;
static char frunonce = 0;
diff --git a/util/ihealth.c b/util/ihealth.c
index 5167950..fbe5f0d 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.96";
+static char * progver = "2.97";
static char fdebug = 0;
static char fipmilan = 0;
static char fcanonical = 0;
@@ -725,8 +725,9 @@ void show_devid_all(int dtype, uchar *devrec, int sdevrec)
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;
+ case 1797: prodstr = "(X9DR7)"; break; /*0x0705*/
+ case 2137: prodstr = "(X10DRH)"; break; /*0x0859*/
+ case 4520: prodstr = "(H8DGU)"; break;
case 43025: prodstr = "(H8DGU-F)"; break;
case 43707: prodstr = "(X8DTH)"; break;
case 48145: prodstr = "(H8DG6)"; break;
diff --git a/util/ilan.c b/util/ilan.c
index 2458fbb..b314c73 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.96";
+static char * progver = "2.97";
static char * progname = "ilan";
static char fdebug = 0;
static char fipmilan = 0;
@@ -624,7 +624,7 @@ static void getauthstr(uchar auth, char *s)
}
static int GetDeviceID(LAN_RECORD *pLanRecord)
-{
+{ /*See also ipmi_getdeviceid( pLanRecord, sizeof(LAN_RECORD),fdebug); */
uchar responseData[MAX_BUFFER_SIZE];
int responseLength = MAX_BUFFER_SIZE;
int status;
diff --git a/util/imb_api.h b/util/imb_api.h
index 56a940c..e6951f8 100644
--- a/util/imb_api.h
+++ b/util/imb_api.h
@@ -49,7 +49,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/* DOS defines wchar_t in stdlib.h */
#else
// defined(LINUX) | defined(SOLARIS)
-#ifndef _WCHAR_T
+#if !defined(_WCHAR_T) && !defined(__WCHAR_TYPE__)
#define _WCHAR_T
typedef long wchar_t;
#endif
diff --git a/util/imbapi.c b/util/imbapi.c
index cbc8fa1..dd62e8b 100644
--- a/util/imbapi.c
+++ b/util/imbapi.c
@@ -909,6 +909,8 @@ int ipmi_cmdraw_ia(BYTE cmd, BYTE netfn, BYTE lun, BYTE sa, BYTE bus,
#ifdef WIN32
imbDev = "[imbdrv]";
if (1)
+#elif HPUX
+ imbDev = "/dev/ipmi";
#else
imbDev = "/dev/imb";
if (stat(imbDev, &stbuf) == -1) {
diff --git a/util/ipicmg.c b/util/ipicmg.c
index 634fb16..7315270 100644
--- a/util/ipicmg.c
+++ b/util/ipicmg.c
@@ -81,7 +81,7 @@
/* Global data */
static char * progname = "ipicmg";
-static char * progver = "2.96";
+static char * progver = "2.97";
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 858d062..d969173 100644
--- a/util/ipmicmd.c
+++ b/util/ipmicmd.c
@@ -460,28 +460,6 @@ static struct {
// { DRV_VA, "va" },
// { DRV_GNU, "free" },
-char *show_driver_type(int idx)
-{
- int i;
- char *tag;
- for (i = 0; i < ndrivers; i++)
- {
- if (drv_types[i].idx == idx) {
- tag = drv_types[i].tag;
- break;
- }
- }
- if (i >= ndrivers) { /*not found*/
- tag = "unknown";
- }
- return(tag);
-}
-
-int get_driver_type(void)
-{
- return(fDriverTyp);
-}
-
void set_iana(int iana)
{
my_devid[6] = (iana & 0x0000ff);
@@ -504,6 +482,28 @@ void get_mfgid(int *pvend, int *pprod)
*pprod = my_devid[9] + (my_devid[10] << 8);
}
+char *show_driver_type(int idx)
+{
+ int i;
+ char *tag;
+ for (i = 0; i < ndrivers; i++)
+ {
+ if (drv_types[i].idx == idx) {
+ tag = drv_types[i].tag;
+ break;
+ }
+ }
+ if (i >= ndrivers) { /*not found*/
+ tag = "unknown";
+ }
+ return(tag);
+}
+
+int get_driver_type(void)
+{
+ return(fDriverTyp);
+}
+
int set_driver_type(char *tag)
{
int rv = 0;
@@ -1048,6 +1048,8 @@ int ipmi_getpicmg(uchar *presp, int sresp, char fdebug)
int ipmi_getdeviceid(uchar *presp, int sresp, char fdebug)
{
int rc, i; uchar cc;
+ char mbstr[80] = "unknown";
+
/* check that sresp is big enough (default is 15 bytes for Langley)*/
if (sresp < 15) return(ERR_BAD_LENGTH);
rc = ipmi_cmd_mc(GET_DEVICE_ID, NULL, 0, presp,&sresp, &cc, fdebug);
@@ -1345,7 +1347,7 @@ void parse_lan_options(int c, char *popt, char fdebugcmd)
switch(c)
{
- case 'p':
+ case 'p':
i = atoi(popt);
if (i > 0) lanp.port = i;
else printf("-p port %d < 0, defaults to %d\n",
diff --git a/util/ipmicmd.h b/util/ipmicmd.h
index a4c911b..989cd8d 100644
--- a/util/ipmicmd.h
+++ b/util/ipmicmd.h
@@ -475,6 +475,7 @@ int ipmi_getdeviceid(uchar *presp, int sresp, char fdebugcmd);
int ipmi_getpicmg(uchar *presp, int sresp, char fdebug);
char *show_driver_type(int idx);
int set_driver_type(char *tag);
+int set_driver_options(int fdir);
int get_driver_type(void);
int nodeislocal(char *nodename);
/* These *_mc routines are used to manage changing the mc.
diff --git a/util/ipmidir.c b/util/ipmidir.c
index 4865bc0..501f47b 100644
--- a/util/ipmidir.c
+++ b/util/ipmidir.c
@@ -46,6 +46,9 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*----------------------------------------------------------------------*/
+#if defined(__IA64__)
+#define STUB_IO 1
+#endif
#if defined(STUB_IO)
/* May stub out direct io. For instance, PPC does not support <sys/io.h> */
#define UCHAR unsigned char
@@ -64,7 +67,7 @@ int ipmi_cmd_direct(UINT16 icmd, UCHAR *pdata, int sdata, UCHAR *presp,
int ipmi_set_max_kcs_loops(int ms)
{ return(0); }
-#elif defined(LINUX) || defined(BSD) || defined(DOS) || defined(MACOS)
+#elif defined(LINUX) || defined(BSD) || defined(DOS) || defined(MACOS) || defined(HPUX)
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
@@ -85,7 +88,7 @@ int ipmi_set_max_kcs_loops(int ms)
#if defined(LINUX)
#include <sys/io.h>
-#elif defined(BSD) || defined(MACOS)
+#elif defined(BSD) || defined(MACOS) || defined(HPUX)
// #include <machine/cpufunc.h>
int iofd = -1;
@@ -201,7 +204,7 @@ extern unsigned outp(unsigned _port, unsigned _value);
#define WritePortUchar( addr, val ) outp((addr),(val))
#define WritePortUlong( addr, val ) ( outp((addr),(val)) )
#define ReadPortUlong( addr, valp ) (*(valp) = inp((addr)) )
-#elif defined(BSD) || defined(MACOS)
+#elif defined(BSD) || defined(MACOS) || defined(HPUX)
#define _INB(addr) inbc((addr))
#define _OUTB(data, addr) outbc((addr),(data))
#define _IOPL(data) 0
@@ -421,6 +424,8 @@ int ipmi_open_direct(int fdebugcmd)
BMC_base = mybase;
DBGP("smbios: Driver=%d(%s), sa=%02x, Base=0x%04x, Spacing=%d\n",
g_DriverType,BmcDesc(g_DriverType),sa,mybase,inc);
+ } else {
+ return ERR_NO_DRV; /*no SMBIOS IPMI record*/
}
}
@@ -467,7 +472,7 @@ int ipmi_open_direct(int fdebugcmd)
int ipmi_close_direct(void)
{
int status = 0;
-#if defined(BSD) || defined(MACOS)
+#if defined(BSD) || defined(MACOS) || defined(HPUX)
close(iofd);
iofd = -1;
#endif
@@ -1227,7 +1232,7 @@ int ImbInit_dir(void)
BMC_base = kcsBaseAddress;
DBGP("Continuing with KCS on Default Port 0x%04x\n",kcsBaseAddress);
}
-#if defined(BSD) || defined(MACOS)
+#if defined(BSD) || defined(MACOS) || defined(HPUX)
iofd = open("/dev/io",O_RDWR);
if (iofd < 0) {
printf("Cannot open /dev/io...Exiting\n");
diff --git a/util/ipmilan.c b/util/ipmilan.c
index 814092e..1f5b949 100644
--- a/util/ipmilan.c
+++ b/util/ipmilan.c
@@ -85,7 +85,7 @@ typedef unsigned int socklen_t;
#include <stdlib.h>
#undef HAVE_LANPLUS
-#else /* Linux */
+#else /* Linux, BSD, etc. */
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
@@ -103,8 +103,12 @@ typedef unsigned int socklen_t;
#include <sys/time.h>
#include <time.h>
#include <signal.h>
+#ifdef HPUX
+#define RECV_MSG_FLAGS 0x40 /*match MSG_WAITALL for HPUX*/
+#else
#define RECV_MSG_FLAGS MSG_WAITALL
#endif
+#endif
#include "ipmicmd.h"
#include "ipmilan.h"
@@ -638,8 +642,11 @@ int open_sockfd(char *node, int port, SockType *sfd, SOCKADDR_T *daddr,
fprintf(fperr,"lan, gethostbyname(%s): errno=%d\n", node,get_errno());
#elif SOLARIS
fprintf(fperr,"lan, gethostbyname(%s): errno=%d\n", node,get_errno());
+#elif defined(HPUX)
+ /*added by ugene */
+ fprintf(fperr,"lan, gethostbyname(%s): errno=%d\n", node,errno);
#else
- fprintf(fperr,"lan, gethostbyname(%s): %s\n", node,hstrerror(errno));
+ fprintf(fperr,"lan, gethostbyname(%s): %s\n", node,hstrerror(errno));
#endif
}
close_sockfd(_sockfd);
@@ -1426,7 +1433,14 @@ static int ipmilan_open_session(SockType sfd, struct sockaddr *destaddr,
fprintf(fpdbg,"GetChanAuth reports only v2 capability\n");
rv = LAN_ERR_V2; /*try v2 instead*/
goto ERREXIT;
- }
+ } else {
+ /* Always switch to IPMI LAN 2.0 if detected. */
+ /* This avoids errors from Dell & Huawei firmware */
+ if (fdebuglan)
+ fprintf(fpdbg,"GetChanAuth detected v2, so switch to v2\n");
+ rv = LAN_ERR_V2; /*use v2 instead*/
+ goto ERREXIT;
+ }
}
/* Check authentication support */
imsgauth = rbuf[3];
diff --git a/util/ipmimv.c b/util/ipmimv.c
index 06b1baf..4404beb 100644
--- a/util/ipmimv.c
+++ b/util/ipmimv.c
@@ -52,7 +52,7 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*----------------------------------------------------------------------*/
-#if defined(LINUX) || defined(BSD) || defined(MACOS)
+#if defined(LINUX) || defined(BSD) || defined(MACOS) || defined(HPUX)
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
@@ -62,6 +62,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <time.h>
#include <errno.h>
#include <sys/ioctl.h>
+#include <sys/select.h>
#if defined(MACOS)
#include <sys/time.h>
#else
@@ -111,7 +112,7 @@ struct timeval {
#endif
int ipmi_timeout_mv = 10; /* 10 seconds, was 5 sec */
-#if defined(BSD) || defined(MACOS)
+#if defined(BSD) || defined(MACOS) || defined(HPUX)
#pragma pack(1)
#endif
@@ -152,7 +153,7 @@ struct ipmi_cmdspec
unsigned char netfn;
unsigned char cmd;
};
-#if defined(BSD) || defined(MACOS)
+#if defined(BSD) || defined(MACOS) || defined(HPUX)
#pragma pack()
/* FreeBSD 7.x ipmi ioctls, use _IOW */
#define IPMI_IOC_MAGIC 'i'
@@ -253,23 +254,23 @@ int ipmi_open_mv(char fdebugcmd)
pdev = "/dev/ipmi/0";
ipmi_fd = open("/dev/ipmi/0", O_RDWR);
if (ipmi_fd == -1) {
- if (fdebugcmd) dbgmsg("ipmi_open_mv: cannot open %s\n",pdev);
- pdev = "/dev/ipmi0";
- ipmi_fd = open(pdev, O_RDWR);
+ if (fdebugcmd) dbgmsg("ipmi_open_mv: cannot open %s\n",pdev);
+ pdev = "/dev/ipmi0";
+ ipmi_fd = open(pdev, O_RDWR);
}
if (ipmi_fd == -1) {
- if (fdebugcmd) dbgmsg("ipmi_open_mv: cannot open %s\n",pdev);
- pdev = "/dev/ipmidev0";
- ipmi_fd = open(pdev, O_RDWR);
+ if (fdebugcmd) dbgmsg("ipmi_open_mv: cannot open %s\n",pdev);
+ pdev = "/dev/ipmidev0";
+ ipmi_fd = open(pdev, O_RDWR);
}
if (ipmi_fd == -1) {
- if (fdebugcmd) dbgmsg("ipmi_open_mv: cannot open %s\n",pdev);
- pdev = "/dev/ipmidev/0";
- ipmi_fd = open(pdev, O_RDWR);
+ if (fdebugcmd) dbgmsg("ipmi_open_mv: cannot open %s\n",pdev);
+ pdev = "/dev/ipmidev/0";
+ ipmi_fd = open(pdev, O_RDWR);
}
if (ipmi_fd == -1) {
- if (fdebugcmd) dbgmsg("ipmi_open_mv: cannot open %s\n",pdev);
- return(-1);
+ if (fdebugcmd) dbgmsg("ipmi_open_mv: cannot open %s\n",pdev);
+ return(-1);
}
ipmi_get_mymc(&bus,&sa,&lun,NULL);
if (sa != BMC_SA) { /* user specified my slave address*/
diff --git a/util/ipmiutil.c b/util/ipmiutil.c
index 05c13db..d5ad57d 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.96";
+static char *progver = "2.97";
// static char fdebug = 0;
/*int ipmiutil(int argc, char **argv); */
diff --git a/util/ipmiutil.mak b/util/ipmiutil.mak
index 40daaf8..5ead440 100644
--- a/util/ipmiutil.mak
+++ b/util/ipmiutil.mak
@@ -58,7 +58,8 @@ MKLIB=lib
RM=del
CP=copy
-LIBS_EX = advapi32.lib kernel32.lib wsock32.lib $(LIBS_W) $(LIBC_RT)
+# added ws2_32.lib
+LIBS_EX = advapi32.lib kernel32.lib wsock32.lib ws2_32.lib $(LIBS_W) $(LIBC_RT)
LIBS_PEF = /LIBPATH:$(LIB_D) iphlpapi.lib
# LIBS_EX+=wsock32.lib user32.lib gdi32.lib
@@ -414,6 +415,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
@@ -425,3 +432,4 @@ ievents2.obj: ievents.c ievents.h $(HEADER)
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/ipmiutil.mak.orig b/util/ipmiutil.mak.orig
deleted file mode 100644
index f98cd66..0000000
--- a/util/ipmiutil.mak.orig
+++ /dev/null
@@ -1,423 +0,0 @@
-# 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/ipmiutil64.mak b/util/ipmiutil64.mak
index fa6b88e..adb06a2 100644
--- a/util/ipmiutil64.mak
+++ b/util/ipmiutil64.mak
@@ -411,10 +411,10 @@ ipmi_sample2.exe: $(SAMP_LIB) ipmi_sample.c isensor.c ievents.c
del isensor.obj ievents.obj
ifruset.obj: ifruset.c
- $(CC) /c $(CFLAGS_SAM) 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)
+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
@@ -427,3 +427,4 @@ ievents2.obj: ievents.c ievents.h $(HEADER)
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/ireset.c b/util/ireset.c
index 0bfdeb0..713599d 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.96";
+static char * progver = "2.97";
static char * progname = "ireset";
static uchar ipmi_maj;
static uchar ipmi_min;
@@ -410,7 +410,7 @@ static int IPMI_Reset(uchar bpower, uchar bootopt)
responseData[0], responseData[1]);
}
if (status == ACCESS_OK && completionCode == 0) {
- printf("chassis_reset ok\n");
+ printf("chassis_reset(%x) ok\n",bpower);
//successful, done
return(0);
} else if (fipmilan && (status < 0)) {
diff --git a/util/isel.c b/util/isel.c
index 723ae48..3492342 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.96";
+static char *progver = "2.97";
#ifdef WIN32
#define IDXFILE "sel.idx"
static char idxfile[80] = IDXFILE;
@@ -767,8 +767,9 @@ int i_sel(int argc, char **argv)
ret = geteuid();
if (ret > 1) {
printf("Not superuser (%d)\n", ret);
- ret = ERR_NOT_ALLOWED;
- goto do_exit;
+ /* Show warning, but could be ok if /dev/ipmi0 is accessible */
+ //ret = ERR_NOT_ALLOWED;
+ //goto do_exit;
}
}
#endif
diff --git a/util/iseltime.c b/util/iseltime.c
index 0d82c90..0675cce 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.96";
+static char * progver = "2.97";
static char * progname = "iseltime";
static char fdebug = 0;
static char fset = 0;
diff --git a/util/isensor.c b/util/isensor.c
index e5a80e0..6be2836 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.96";
+static char *progver = "2.97";
#ifdef WIN32
static char savefile[] = "%ipmiutildir%\\thresholds.cmd";
#else
@@ -1353,10 +1353,13 @@ int get_sdr_file(char *sdrfile, uchar **sdrlist)
/* determine number of SDRs by number of lines in the file */
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"); /*++++*/
- }
+ 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"); /*fdebug*/
+ free_sdr_cache(psdrcache); /*free previous sdrcache*/
+ }
+ }
sdrbuf = malloc(num * SDR_SZ);
if (sdrbuf == NULL) {
fclose(fp);
@@ -1405,10 +1408,9 @@ 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"); /*++++*/
+ else if (fdebug) printf("get_sdr_cache: Allocating cache\n");
rv = GetSDRRepositoryInfo(&n,&fdevsdrs);
if (rv != 0) return(rv);
@@ -1612,6 +1614,7 @@ int find_sdr_by_id(uchar *psdr, uchar *pcache, ushort id)
recid = sdr[0] + (sdr[1] << 8);
asz += len;
if (recid == id) { rv = 0; break; }
+ else if (id == 0) { rv = 0; break; } /* 0000 = first one */
}
if (rv == 0) memcpy(psdr,sdr,len);
return(rv);
@@ -2462,11 +2465,13 @@ ShowSDR(char *tag, uchar *sdr)
if (fdebug) printf("ShowSDR: len=%d, type=%x\n",len,sdr[3]);
memset(sens,0,4);
if (frawsdr || fdebug) {
+ /* raw is different than dump_buf */
printf("raw SDR: ");
for (i = 0; i < len; i++)
printf("%02x ",sdr[i]);
printf("\n");
}
+ strcpy(idstr,"INIT"); /*always set idstr to some initial string*/
switch(sdr[3])
{
case 0x01: /* Full sensor record */
@@ -2475,12 +2480,19 @@ ShowSDR(char *tag, uchar *sdr)
if (ioff > len) {
if (fdebug) printf("bad length: type=%x, len=%d, ioff=%d\n",
sdr[3],len,ioff);
- printf("Bad SDR Length, please apply the correct FRU/SDR diskette\n");
+ fprintf(stderr,"Bad SDR Length %d, please apply the correct FRU/SDR diskette\n",len);
return;
}
sens_cap = sdr[11]; /*sdr01->sens_capab*/
+ // ilen = (sdr[ioff] & 0x1f); /*sdr01->id_typelen*/
ilen = len - ioff;
+ if (fdebug) printf("SDR[%x] Full ioff=%d idTypLen=0x%02x ilen=%d\n",
+ sdr01->recid, ioff,sdr[ioff] ,ilen);
if (ilen >= sizeof(idstr)) ilen = sizeof(idstr) - 1;
+ if (ilen <= 0) { /*bug if true*/
+ fprintf(stderr,"Bad SDR Length %d, omits ID string\n",len);
+ ilen = 16; /*less than sizeof(idstr)*/
+ }
memcpy(idstr,&sdr[ioff],ilen);
for (i=ilen; i<16; i++) { idstr[i] = ' '; ilen++; }
idstr[ilen] = 0; /* stringify */
@@ -2580,7 +2592,7 @@ ShowSDR(char *tag, uchar *sdr)
if (ioff > len) {
if (fdebug) printf("bad length: type=%x, len=%d, ioff=%d\n",
sdr[3],len,ioff);
- printf("Bad SDR Length, please apply the correct FRU/SDR diskette\n");
+ fprintf(stderr,"Bad SDR Length, please apply the correct FRU/SDR diskette\n");
return;
}
sens_cap = sdr[11]; /*sdr02->sens_capab*/
@@ -2682,7 +2694,7 @@ ShowSDR(char *tag, uchar *sdr)
sdr02 = (SDR02REC *)sdr;
ioff = 17;
if (ioff > len) {
- printf("Bad SDR %x Length %d. Please apply the correct FRU/SDR diskette\n",
+ fprintf(stderr,"Bad SDR %x Length %d. Please apply the correct FRU/SDR diskette\n",
sdr02->recid, len);
return;
}
@@ -3065,7 +3077,7 @@ int i_sensor(int argc, char **argv)
uchar devrec[16];
int sz, i, j;
int fsetfound = 0;
- int iloop;
+ int iloop, irec;
int ipass, npass;
uchar *pset;
char *p;
@@ -3264,8 +3276,9 @@ int i_sensor(int argc, char **argv)
i = geteuid();
if (i > 1) {
printf("Not superuser (%d)\n", i);
- ret = ERR_NOT_ALLOWED;
- goto do_exit;
+ /* Show warning, but could be ok if /dev/ipmi0 is accessible */
+ //ret = ERR_NOT_ALLOWED;
+ //goto do_exit;
}
}
#endif
@@ -3454,10 +3467,13 @@ int i_sensor(int argc, char **argv)
{
if (fshowidx) recid = sensor_idx1;
else recid = 0;
+ irec = 0; /*first sdr record*/
while (recid != 0xffff)
{
if (fjumpstart) {
- ret = find_sdr_next(sdrdata,psdrcache,recid);
+ if (irec == 0) /*need sdr_by_id if fshowid recid>0*/
+ ret = find_sdr_by_id(sdrdata,psdrcache,recid);
+ else ret = find_sdr_next(sdrdata,psdrcache,recid);
if (ret != 0) { /*end of sdrs*/
if (fdebug) printf("find_sdr_next(%04x): ret = %d\n", recid,ret);
ret = 0; break;
@@ -3476,8 +3492,8 @@ int i_sensor(int argc, char **argv)
printf("GetSDR[%04x]: ret = %x, next=%x\n",recid,ret,recnext);
if (ret != 0) {
if (ret > 0) { /* ret is a completion code error */
- printf("%04x GetSDR error 0x%02x %s, rlen=%d\n",recid,ret,
- decode_cc((ushort)0,(uchar)ret),sz);
+ fprintf(stderr,"%04x GetSDR error 0x%02x %s, rlen=%d\n",
+ recid,ret,decode_cc((ushort)0,(uchar)ret),sz);
if (ret == 0xC5) { /* lost Reservation ID, retry */
/* This means that some other IPMI software has
* requested a Reservation before we finished, so
@@ -3488,7 +3504,8 @@ int i_sensor(int argc, char **argv)
printf("GetSDR[%04x]: ret = %x, next=%x\n",recid,ret,
recnext);
}
- } else printf("%04x GetSDR error %d, rlen = %d\n", recid,ret,sz);
+ } else fprintf(stderr,"%04x GetSDR error %d, rlen = %d\n",
+ recid,ret,sz);
if (sz < MIN_SDR_SZ) { /* don't have recnext, so abort */
break;
} /* else fall through & continue */
@@ -3559,7 +3576,7 @@ int i_sensor(int argc, char **argv)
{
ret = GetSDR(_recid,&_recnext,_sdrdata,sizeof(_sdrdata),&_sz);
if (ret != 0) {
- printf("%04x GetSDR error %d, rlen = %d\n",_recid,ret,_sz);
+ fprintf(stderr,"%04x GetSDR error %d, rlen = %d\n",_recid,ret,_sz);
break;
}
else if (_sz >= MIN_SDR_SZ)
@@ -3644,15 +3661,16 @@ int i_sensor(int argc, char **argv)
} /*endif ok, got full SDR */
NextSdr:
- if (fshowidx) {
- /* if we have already read the last in the range, done. */
- if (recid >= sensor_idxN) break; // recnext = 0xffff; // break;
- }
if (fjumpstart) recid = recnext;
else {
if (recnext == recid) recid = 0xffff; /*break;*/
else recid = recnext;
}
+ if (fshowidx) {
+ /* if we have already read the last in the range, done. */
+ if (recid >= sensor_idxN) break; // recnext = 0xffff; // break;
+ }
+ irec++;
} /*end while recid*/
if (fdoloop && (nloops > 1)) {
printf("\n"); /* output an empty separator line */
diff --git a/util/iserial.c b/util/iserial.c
index 07fc3cc..48145ea 100644
--- a/util/iserial.c
+++ b/util/iserial.c
@@ -155,7 +155,7 @@ typedef struct
/*
* Global variables
*/
-static char * progver = "2.96";
+static char * progver = "2.97";
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 50b0caf..c73099a 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.96";
+static char * progver = "2.97";
static char * progname = "isol";
static char fdebug = 0;
static char fpicmg = 0;
diff --git a/util/itsol.c b/util/itsol.c
index 21e5f6c..e713982 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.96";
+static char * progver = "2.97";
static uchar g_bus = PUBLIC_BUS;
static uchar g_sa = BMC_SA;
static uchar g_lun = BMC_LUN;
@@ -511,6 +511,11 @@ ipmi_tsol_main(void * intf, int argc, char ** argv)
if (recvip != NULL)
result = ipmi_tsol_stop(intf, recvip, port);
return LAN_ERR_NOTSUPPORT;
+#elif defined(HPUX)
+ printf("HPUX TSOL terminal handling not yet implemented\n");
+ if (recvip != NULL)
+ result = ipmi_tsol_stop(intf, recvip, port);
+ return LAN_ERR_NOTSUPPORT;
#else
/*
* retrieve local IP address if not supplied on command line
diff --git a/util/iwdt.c b/util/iwdt.c
index 0e6d932..66db234 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.96";
+static char * progver = "2.97";
static char * progname = "iwdt";
static char fdebug = 0;
static char fdontlog = 0;
diff --git a/util/mem_if.c b/util/mem_if.c
index c445138..9be58a9 100644
--- a/util/mem_if.c
+++ b/util/mem_if.c
@@ -65,8 +65,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <sys/param.h>
#include <sys/mman.h>
#include <sys/ioctl.h>
+#ifdef __linux__
+#include <linux/param.h>
#endif
-#if defined(SOLARIS) || defined(BSD)
+#endif
+#if defined(SOLARIS) || defined(BSD) || defined(HPUX)
#define EXEC_PAGESIZE 4096
#endif
@@ -274,6 +277,11 @@ static int m_iCount = 0;
int OpenIMemoryInterface(void)
{
int rv = -1;
+/* ARM64 does not handle /dev/mem the same.
+ * It exposes SMBIOS at /sys/firmware/dmi/tables/, but because
+ * IO memory is memory mapped, cannot use legacy /dev/mem. */
+#ifndef __arm__
+#ifndef __aarch64__
//check to see if driver has been previously defined
if (!m_iDriver) { //open the driver
m_iDriver = open(MEM_DRIVER, O_RDONLY);
@@ -286,6 +294,8 @@ int OpenIMemoryInterface(void)
m_iCount++;
}
if (m_iDriver > 0) rv = 0;
+#endif
+#endif
return(rv);
}
diff --git a/util/oem_dell.c b/util/oem_dell.c
index 0e16d95..530f16a 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.96";
+static char * progver = "2.97";
static char * progname = "idelloem";
static int verbose = 0;
static char fdebug = 0;
@@ -5694,10 +5694,10 @@ char * get_dell_evt_desc(uchar *sel_rec)
}
node = (incr + i)/dimmsPerNode;
dimmNum = ((incr + i)%dimmsPerNode)+1;
- dimmStr[5] = node + 'A';
+ dimmStr[6] = node + 'A';
sprintf(tmpdesc,"%d",dimmNum);
- dimmStr[6] = tmpdesc[0];
- dimmStr[7] = '\0';
+ dimmStr[7] = tmpdesc[0];
+ dimmStr[8] = '\0';
strcat(str,dimmStr);
count++;
}
@@ -5719,8 +5719,8 @@ char * get_dell_evt_desc(uchar *sel_rec)
count = 0;
}
sprintf(tmpdesc,"%d",(i + incr + 1));
- dimmStr[4] = tmpdesc[0];
- dimmStr[5] = '\0';
+ dimmStr[5] = tmpdesc[0];
+ dimmStr[6] = '\0';
strcat(str, dimmStr);
count++;
}
diff --git a/util/oem_sun.c b/util/oem_sun.c
index 65a3522..fc899bd 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.96";
+static char * progver = "2.97";
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 5d7dee9..35df1bd 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.96";
+static char * progver = "2.97";
static char * progname = "ismcoem";
static int verbose = 0;
static char fdebug = 0;
@@ -106,6 +106,18 @@ int oem_supermicro_get_bmc_status(uchar *sts)
return(rv);
}
+/*
+ * oem_supermicro_get_bmc_services_status
+ *
+ * Request
+ * 0x30 - OEM network function
+ * 0x70 - OEM cmd
+ * 0xF0 - subcommand
+ * 0x?? - action 00=disable, 01=enable, 02=status
+ *
+ * Response
+ * 0x?? - if action=status: 00=disabled, 01=enabled
+ */
int oem_supermicro_set_bmc_status(uchar sts)
{
int rv;
@@ -132,6 +144,83 @@ int oem_supermicro_set_bmc_status(uchar sts)
return(rv);
}
+/*
+ oem_supermicro_psstatus1(uchar psnum, uchar *val)
+*/
+int oem_supermicro_psstatus1(uchar psnum, uchar *val)
+{
+ int rv;
+ int rlen;
+ uchar idata[16];
+ uchar rdata[16];
+ uchar cc;
+
+ idata[0] = 0x07; /*busid*/
+ if (psnum <= 1) idata[1] = 0x70; /* PS 1 */
+ else if (psnum == 2) idata[1] = 0x72; /* PS 2 */
+ else /*if (psnum == 3)*/ idata[1] = 0x74; /* PS 3 */
+ idata[2] = 0x01; /* return one byte of PS status data */
+ idata[3] = 0x0C;
+ rlen = sizeof(rdata);
+ rv = ipmi_cmd(MASTER_WRITE_READ, idata, 4, rdata, &rlen, &cc, fdebug);
+ if ((rv == 0) && (cc != 0)) rv = cc;
+ if (rv == 0) { *val = rdata[0]; }
+ return(rv);
+}
+
+/*
+ oem_supermicro_psstatus2(uchar psnum, uchar *val)
+ Get PMBus Power Supply Status, for X10 motherboards
+*/
+int oem_supermicro_psstatus2(uchar psnum, uchar *val)
+{
+ int rv;
+ int rlen;
+ uchar idata[16];
+ uchar rdata[16];
+ uchar cc;
+
+ idata[0] = 0x07; /*busid*/
+ if (psnum <= 1) idata[1] = 0x78; /* PS 1 */
+ else if (psnum == 2) idata[1] = 0x7A; /* PS 2 */
+ else /*if (psnum == 3)*/ idata[1] = 0x7C; /* PS 3 */
+ idata[2] = 0x01; /* return one byte of PS status data */
+ idata[3] = 0x78;
+ rlen = sizeof(rdata);
+ rv = ipmi_cmd(MASTER_WRITE_READ, idata, 4, rdata, &rlen, &cc, fdebug);
+ if ((rv == 0) && (cc != 0)) rv = cc;
+ if (rv == 0) { *val = rdata[0]; }
+ return(rv);
+}
+
+/*
+ oem_supermicro_psstatus3(uchar psnum, uchar *val)
+ Get PMBus Power Supply Status, for X10 motherboards
+
+ raw 0x06 0x52 0x07 0xb0 0x01 0x0c for power supply 1
+ raw 0x06 0x52 0x07 0xb2 0x01 0x0c for power supply 2
+*/
+int oem_supermicro_psstatus3(uchar psnum, uchar *val)
+{
+ int rv;
+ int rlen;
+ uchar idata[16];
+ uchar rdata[16];
+ uchar cc;
+
+ idata[0] = 0x07; /*busid*/
+ if (psnum <= 1) idata[1] = 0xB0; /* PS 1 */
+ else if (psnum == 2) idata[1] = 0xB2; /* PS 2 */
+ else /*if (psnum == 3)*/ idata[1] = 0xB4; /* PS 3 */
+ idata[2] = 0x01; /* return one byte of PS status data */
+ idata[3] = 0x0C;
+ rlen = sizeof(rdata);
+ rv = ipmi_cmd(MASTER_WRITE_READ, idata, 4, rdata, &rlen, &cc, fdebug);
+ if ((rv == 0) && (cc != 0)) rv = cc;
+ if (rv == 0) { *val = rdata[0]; }
+ return(rv);
+}
+
int oem_supermicro_get_lan_port(uchar *val)
{
int rv;
@@ -448,12 +537,13 @@ static void usage(void)
printf(" bmcstatus [enable| disable] = get/set BMC status\n");
printf(" firmware = get extra firmware info\n");
printf(" lanport [dedicated| lan1| failover] = get/set IPMI LAN port\n");
+ printf(" powersupply <num> = get PMBus PowerSupply status\n");
printf("These commands may not work on all SuperMicro systems\n");
}
static int ipmi_smcoem_main(int argc, char **argv)
{
- int rv = 0;
+ int n,rv = 0;
char msg[80];
uchar val;
@@ -506,6 +596,39 @@ static int ipmi_smcoem_main(int argc, char **argv)
if (rv == 0) oem_supermicro_show_lan_port(val);
}
}
+ } else if (strncmp(argv[0],"powersupply",11) == 0) {
+ if (argv[1] == NULL) {
+ usage();
+ rv = ERR_USAGE;
+ } else {
+ char DevRec[16];
+ int xver = 9;
+ n = atoi(argv[1]); /* power supply number */
+ rv = ipmi_getdeviceid( DevRec, sizeof(DevRec),fdebug);
+ if (rv == 0) {
+ int vend_id, prod_id;
+ /* 1562 (0x061A) = X8SIU */
+ /* 1572 (0x0624) = X9SCM */
+ /* 1797 (0x0705) = X9DR7 */
+ /* 2137 (0x0859) = X10DRH */
+ vend_id = DevRec[6] + (DevRec[7] << 8) + (DevRec[8] << 16);
+ prod_id = DevRec[9] + (DevRec[10] << 8);
+ if (prod_id > 0x0800) xver = 10;
+ else if (prod_id > 1570) xver = 9;
+ else xver = 8;
+ }
+ if (xver == 10) rv = oem_supermicro_psstatus3(n, &val);
+ else if (xver == 9) rv = oem_supermicro_psstatus2(n, &val);
+ else /*xver==8*/ rv = oem_supermicro_psstatus1(n, &val);
+ if (rv == 0) {
+ if (val == 0x00) strcpy(msg,"good");
+ else if (val == 0x02) strcpy(msg,"ok");
+ else sprintf(msg,"bad 0x%02x",val);
+ printf("X%d Power Supply %d status = %d (%s)\n",xver,n,val,msg);
+ } else {
+ printf("X%d Power Supply %d error = %d\n",xver,n,rv);
+ }
+ }
} else {
usage();
rv = ERR_USAGE;
diff --git a/util/subs.c b/util/subs.c
index c5f9308..13e1603 100644
--- a/util/subs.c
+++ b/util/subs.c
@@ -132,6 +132,7 @@ void lprintf(int level, const char * format, ...)
static char logtmp[LOG_MSG_LENGTH];
FILE *fp = stderr;
if (!verbose && (level > loglevel)) return;
+ if (level > LOG_WARN) fp = stdout; /*NOTICE,INFO*/
if (fdbglog && (fplog != NULL)) fp = fplog;
#ifdef WIN32
va_start(vptr, format);
@@ -834,7 +835,7 @@ void WriteSyslog(char *msgbuf)
int level;
sev = find_msg_sev(msgbuf);
switch(sev) {
- case SEV_MIN: level = LOG_WARNING; break;
+ case SEV_MIN: level = LOG_WARN; break;
case SEV_MAJ: level = LOG_ERR; break;
case SEV_CRIT: level = LOG_CRIT; break;
case SEV_INFO: