1375 Commits

Author SHA1 Message Date
Zdenek Styblik
472d8ab1b3 ID: 3576213 - 'lib/ipmi_fru.c' - unused variable
Commit removes two unused variables, rsp and req, from
ipmi_fru_set_field_string_rebuild() in 'lib/ipmi_fru.c'.

Reported by: Dune Idaho
2012-11-02 06:35:51 +00:00
Zdenek Styblik
4af83567b0 ID: 3528271 - 'lib/ipmi_fru.c' - possible *flow via FRUID
Commit fixes *flow via atoi() and not checking strtol() properly. is_fru_id()
wrapper has been added to mitigate code repetition.

Reported by: Dune Idaho
2012-11-02 06:11:06 +00:00
Zdenek Styblik
66bdb86f04 ID: 3528388 - 'lib/ipmi_ekanalyzer.c' - a typo in error message
Commit fixes a typo in error message in 'lib/ipmi_ekanalyzer.c'.

Reported by: Dune Idaho
2012-11-01 18:52:11 +00:00
Zdenek Styblik
9ef6162f3c ID: 3576211 - 'lib/ipmi_delloem.c' - unused variable
Commit removes unused variables in ipmi_led_get_platform_model_name() in
'lib/ipmi_delloem.c'.

Reported by: Dune Idaho
2012-11-01 18:45:31 +00:00
Zdenek Styblik
629a96d9c3 ID: 3576210 - 'lib/ipmi_dcmi.c' - unused variable
Commit removes unused variable in ipmi_dcmi_prnt_oobDiscover() in
'lib/ipmi_dcmi.c'.

Reported by: Dune Idaho
2012-11-01 18:44:05 +00:00
Zdenek Styblik
122e11a2e8 ID: 3522731 - 'lib/ipmi_sol.c' - ipmi_get_sol_info() returns always 0
PROPER - Commit fixes ipmi_get_sol_info()'s return value, so (-1) is returned on
error, eg. response is NULL. It doesn't matter whether it is first or last
response, we bail out immediately.
Commit also fixes missing argument to one lprintf() and
indentation(spaces->tabs).

This bug is connected with ``ID: 1835038 - 'lib/ipmi_sol.c' -
ipmi_get_sol_info() returns always 0''.

Reported by: Duncan Idaho
2012-10-22 16:50:34 +00:00
Zdenek Styblik
a974ab2c69 REVERT - ID: 3522731 - 'lib/ipmi_sol.c' - ipmi_get_sol_info() returns always 0
I'm reverting to previous revision, because I've realized these
``if (rsp != NULL)'' became redundant.
I'm sorry about that.
2012-10-22 06:09:49 +00:00
Zdenek Styblik
f8f6d51fd2 ID: 3522731 - 'lib/ipmi_sol.c' - ipmi_get_sol_info() returns always 0
Commit fixes ipmi_get_sol_info()'s return value, so (-1) is returned on error,
eg. response is NULL. It doesn't matter whether it is first or last response, we
bail out immediately.
Commit also fixes missing argument to one lprintf() and
indentation(spaces->tabs).

This bug is connected with ``ID: 1835038 - 'lib/ipmi_sol.c' -
ipmi_get_sol_info() returns always 0''.

Reported by: Duncan Idaho
2012-10-21 11:46:17 +00:00
Zdenek Styblik
8d828f6c72 ID: 3564701 - ipmitool 1.8.12 doesn't build on big endian architectures
ipmitool doesn't build on big endian architectures, because of missing include
of <bswap.h>.

Submitted by: Dan Horak
2012-10-21 04:28:08 +00:00
Zdenek Styblik
d54e20c545 ID: 3578022 - 'lib/ipmi_delloem.c' fix typos
This is a patch for building on big endian platforms that fixes the typos
introduced by rev 1.17 of ipmi_delloem.c

Submitted by: Dan Horak
2012-10-21 04:14:38 +00:00
Zdenek Styblik
44310bd898 ID: 3578276 - 'lib/ipmi_fru.c' - free() on freed memory possible
ID: 3578275 - 'lib/ipmi_fru.c' - memory leaks

Commit fixes several memory leaks and possible call of free() on memory that has
been already freed.
Despite 'goto' should be avoided as much as possible, its use seemed to be quite
reasonable in this case.
2012-10-20 19:57:17 +00:00
Zdenek Styblik
a9f7a7b92e ID: 3578277 - 'lib/ipmi_fru.c' - possible NULL pointer
Commit fixes possible NULL pointer by adding check whether fru_bloc, returned
from build_fru_bloc(), is NULL or not. If it is, print an error message and
return (-1).
2012-10-19 07:01:40 +00:00
Zdenek Styblik
d65cccc32a ID: 3577155 - 'lib/ipmi_main.c' - memory leaks
Commit fixes two memory leaks in 'lib/ipmi_main.c'. They were caused by not
freeing memory allocated by strdup() which uses malloc() underneath.

Reported by Duncan Idaho.
2012-10-17 05:03:45 +00:00
Zdenek Styblik
131846fb40 ID: 3577766 - configure's knobs and switches don't work
Some of configure's knobs and switches, eg. --disable-intf-open, don't work.
This is caused by poor choice of variable names, resp. using the same variable
names Autoconf is using. And Autoconf doesn't like it, resp. gets confused.

Variable names prefixed with an 'x' in order to make them 'unique'.
2012-10-17 04:45:14 +00:00
Zdenek Styblik
c62359bd79 lib/ipmi_fru.c - pointless/wrong cast loop
Commit removes pointless(?) and unhandled cast from uint32_t to uint8_t and
back. intf->target_addr is uint32_t, don't try to "squeeze" it into uint8_t
then.
2012-10-04 07:46:27 +00:00
Zdenek Styblik
1e83f7c88a ID: 3568976 - 'sel set time' behaviour is inconsistent
Commit fixes missing '*'. Without it, not only the previous commit breaks more
than it fixes, but it may (eventually) lead to segfault.
2012-10-02 18:55:41 +00:00
Zdenek Styblik
4a4b2e3b59 configure.in - remove Solaris+SPARC -> no BMC
Commit removes false presumption there is no BMC driver for SPARC platform in
Solaris. Also, this makes BMC driver default to yes, being built, on Solaris.
2012-09-29 08:51:53 +00:00
Zdenek Styblik
c88b139452 configure.in - replace leading spaces with tab
Commit replaces leading spaces with single tabulator in solaris section.
Somebody probably mistaken tabs for the spaces.
No functional change.
2012-09-29 08:33:45 +00:00
Zdenek Styblik
6011359cb3 ID: 3571153 - OpenIPMI/ipmievd fails to compile on Solaris
Commit fixes compilation problems on Solaris. These were caused by missing
header file, <sys/ioccom.h>, which defines _IO* macros.
2012-09-28 18:47:01 +00:00
Zdenek Styblik
23a5477d6e ID: 3568976 - 'sel set time' behaviour is inconsistent
Commit fixes inconsistent behaviour of 'sel set time' command. This was caused
by random init values of tm structures.
Also, the state of DST should be looked up now.
2012-09-28 17:50:56 +00:00
Jim Mankovich
700ee7d27d Author: Jan Safranek <jsafrane@redhat.com>
Date:   Mon Aug 13 14:35:28 2012 +0200
    Fixed ipmievd start under systemd.

    Systemd init system starts services with parent PID=1. Still, it is expected
    that the daemon forks and exits with nozero exit status, if its initialization
    fails.
2012-09-05 20:46:16 +00:00
Jim Mankovich
2d725c2cd6 ipmitool should document also -b, -B, -l and -T options, which are
currently missing. The description is taken from ipmitool -h output.

Original author: J.H.M. Dassen, rdassen at redhat.com.
2012-09-05 14:22:36 +00:00
Jordan Hargrave
5c9addb8c4 Fix offset for LCD_STATUS with new sysinfo interface 2012-08-14 17:54:08 +00:00
Jordan Hargrave
c0290ef09a Add support for getsysinfo/setsysinfo commands to ipmi mc
Cleanup Dell OEM code to use new sysinfo interface
2012-08-14 17:32:04 +00:00
Zdenek Styblik
6c1e3e2ecc lib/Makefile.am - fix build without LAN interfaces
Signed-off-by: Duncan Idaho <dune.idaho@gmail.com>

Commit fixes case when ipmitool is built without any LAN interface support,
resp. without LAN and LAN+ support. In such case, build would fail because
md5.c and md5.h are not being linked.
Commit adds 'src/plugins/lan/md5.c' and 'src/plugins/lan/md5.c' to
'lib/Makefile.am'.
2012-08-09 20:13:06 +00:00
Jim Mankovich
77d9e49290 added ipmitool/include/ipmi_sdradd.h to the set of files distributed
for ipmitool 1.8.12
2012-08-09 18:41:04 +00:00
Jim Mankovich
0d62e6f6e0 Update version to 1.8.12 2012-08-07 18:59:29 +00:00
Jim Mankovich
f0f9e187c9 Update change log for the 1.8.12 release 2012-08-07 18:51:35 +00:00
Jim Mankovich
89037b5158 Enable compiler warnings and resolve all compiler warning so that
ipmitool compiles and links with no warning or error messages
2012-08-03 17:07:07 +00:00
Jim Mankovich
342e71d577 Updated the Dell OEM decoding for OS Watch dog timer -type 0x23.
Support added for Post Fatal Error or Events of
sensor type 0x0F. This includes the Fatal Errors
generated from BIOS, BIOS POST, CPU and Others.


Signed-off-by: Srinivas Gowda G <Srinivas_G_Gowda@Dell.com>
2012-07-27 17:11:36 +00:00
Jim Mankovich
e196d85e43 Adding support for Dell specific sensors
IDPT memory - 0x2B. Support for status check of
communication channel between BMC/Other Hardware/CPU. Support for
Flex Address and Virtual MAC Support for  Non-Fatal
PCIE error sensor type 0xC2 and Fatal IO Error 0xC3


Signed-off-by: Srinivas Gowda G <Srinivas_G_Gowda@Dell.com>
2012-07-27 17:02:35 +00:00
Jim Mankovich
7528b89b36 Added support for sensor types - Processor related sensor
type 0x07, system incharectorization 0x20, Memory sensor type.


Signed-off-by: Srinivas Gowda G <Srinivas_G_Gowda@Dell.com>
2012-07-27 16:27:55 +00:00
Jim Mankovich
e07a644672 This patch will give more description for SEL which
is generated for Uncorrectable ECC and errors with respect to
each Memory Bank,Card or DIMM. The Sensor type
included in this patch are 0x0C and 0x10.


Signed-off-by: Srinivas Gowda G <Srinivas_G_Gowda@Dell.com>
2012-07-27 16:20:58 +00:00
Jim Mankovich
fbb778c469 Framework for decoding the Dell specific OEM Bytes from
the SEL Record. This OEM Bytes are specific to Dell
Platforms only.

Signed-off-by: Srinivas Gowda G <Srinivas_G_Gowda@Dell.com>
2012-07-27 16:01:31 +00:00
Jim Mankovich
fdc403302d Bug fixes for delloem lan command. This includes the
support for 12G Dell license and 12G LAN Specific command.


Signed-off-by: Srinivas Gowda G <Srinivas_G_Gowda@Dell.com>
2012-07-27 15:49:23 +00:00
Jim Mankovich
3f712fe2fc Dell specific mac sub command is updated to support
the latest 12G Dell servers.
Support for virtual mac is also implemented.


Signed-off-by: Srinivas Gowda G <Srinivas_G_Gowda@Dell.com>
2012-07-27 15:21:55 +00:00
Jim Mankovich
3631bd877c The sensor threshold values were not verified before setting
for example - if the current UNC is set to 10, one can set the UC to a value less than 10.

In this patch the values are first read and validated against the user specified values and then set.

Signed-off-by: Srinivas Gowda G <Srinivas_G_Gowda@Dell.com>
2012-07-27 15:07:11 +00:00
Jim Mankovich
0ef4c3e254 The unified sensor reading code was incorrectly returning and converting
a sensor reading when the reading/state unavailable bit was set.  This
change makes sure a valid readiing is never returned for a sensor marked
reading/state unavailable.
2012-07-23 14:52:57 +00:00
Jim Mankovich
5d960089c9 Support for analog readings in discrete sensors on HP platforms. This was
implemented without an HP oem specific switch by modifying each interface
open routine to read and cache the OEM manufacturer (via the Get Device ID
command) immediately upon open and to reset the cached OEM manufacturer
id to unknown upon interface close.  The cached manufacturer value in the
interface is then be used at run time to implement the manufacturer
specific code.

A non threshold sensor has an analog value if it is defined as having
analog units and it has either valid percentage or modifier units
defined and the manufacturer is IPMI_OEM_HP.   The determination of
whether or not a given sensor has an analog value is contained in a
single function (sdr_sensor_has_analog_reading).

This patch also encapsulates the reading of all sensor values in
ipmitool into a a single ipmitool function, ipmi_sdr_read_sensor_value.
The prior independent sensor reading code paths have been collapsed into
one sensor reading code path.   This encapsulation enabled consistent
validation of all data returned by the IPMI get sensor reading command.
In implementing a single sensor value read function, I resolved the
inconsistencies between what the "sensor" and "sdr" arguments displayed
and  I also resolved numerous cases where uninitialized information in
the IPMI reply from get sensor reading was being interpreted and
incorrectly displayed.
2012-07-10 16:01:09 +00:00
Jim Mankovich
31cb04f155 Fix exit code on '-o list' or '-o help' option
From: Jan Safranek <jsafrane@redhat.com>

'ipmitool -o list' should return zero exit code.
2012-06-05 16:58:13 +00:00
Jim Mankovich
7289f70ec9 delloem commands should not act before parsing command line.
From: Jan Safranek <jsafrane@redhat.com>

e..g 'ipmitool delloem lan help' should *not* check remote system for DELL
OEM commands before listing help. People tend to write scripts on different
machines and listing help is very helpful. In addition, why check for
setled support if only lan support is needed?
2012-06-05 16:56:39 +00:00
Jim Mankovich
4b058899a2 Fix stack overflow in delloem setled
From: Jan Safranek <jsafrane@redhat.com>

The buffer should be bigger to hold the 10 character, which are set later
in the function.
2012-06-05 16:53:09 +00:00
Jim Mankovich
79fdc68950 Fix delloem powermonitor on big-endian platforms.
From: Jan Safranek <jsafrane@redhat.com>

'ipmitool dellem powermonitor' command should convert data from
network-format to the native one, otherwise it shows garbage on ppc/ppc64
platform.
2012-06-05 16:50:18 +00:00
Jim Mankovich
6a18254c9d Add missing RMCP+ auth type strings 2012-06-05 15:55:28 +00:00
Jim Mankovich
2dfaeac27d Don't overwite the iflags bits prior to setting the boot parameters. This
fixes ipmitool so that chassis bootdev bios clear-cmos=yes will actually
clear the bios cmos.
2012-05-31 15:58:00 +00:00
Jim Mankovich
aab226da28 When using the ipmitool fru command, one of the fields displayed is the
Board Mfg Date.  This date is computed by taking the timestamp in the FRU,
which is based off of 1/1/1996 0:0:0 and adding the delta time from
1/1/1970 0:0:0 to 1/1/1996 0:0:0 so that it can be interpreted by Linux time.
This delta time is a hard-coded constant in ipmi_fru.h (secs_from_1970_1996).
This constant is incorrect.  The correct delta from those two dates should be
820454400.  This is resulting in a Board Mfg Date that is actually 1 hour
earlier than what it should be.

commited for Renzo Hayashi
2012-05-30 21:35:17 +00:00
Jim Mankovich
180aaaabbf Fix fru print so that it will display FRU info from satellite controllers.
committed for Michael Winiarski
2012-05-18 17:10:58 +00:00
Jim Mankovich
bf9406249a Document the ipmitool dcmi commands in the ipmitool man page 2012-05-17 15:52:35 +00:00
Albert Chu
56828dbaf7 fix indexing corner case 2012-05-10 16:35:33 +00:00
Jim Mankovich
219f67e41a * long lines(= lines longer than 80chars)
* validate user input in 'lib/ipmi_sunoem.c', resp. ipmi_sunoem_main()
* 'sunoem sshkey' would accept undefined actions and exit with RC = 0
* RC > 0 and help will be displayed for unknown commands/actions
* "code bumming" - some conditions seemed to be redundant

commited for Duncan Idaho
2012-05-07 14:09:28 +00:00