194 Commits

Author SHA1 Message Date
Dennis Schridde
19423c68d0 Fix implicit function declaration of ipmi_intf_get_max_response_data_size in lib/ipmi_sdr.c 2016-04-11 17:18:40 +02:00
Dennis Schridde
0f896e36f2 Fix "redirecting incorrect #include <sys/poll.h> to <poll.h>" warning with musl libc 2016-04-11 17:18:40 +02:00
Vasant Hegde
c7169bc27e ID:437 - sel: Fix "sel time set <time>"
Presently 'sel time set' doesn't account 'minute' difference between timezone.
So depending on host timezone it may set time to +/-30 mins. This patch adds
minute difference to delta_hour caluclation so that it sets time properly.

output without patch:
  # ./ipmitool sel time get
  03/24/2016 12:34:03
  # ./ipmitool sel time set "03/24/2016 12:34:03"
  03/24/2016 12:04:03
  # ./ipmitool sel time get
  03/24/2016 12:06:09

output with patch:

  # ./ipmitool sel time get
  03/30/2016 08:49:47
  # ./ipmitool sel time set "03/30/2016 08:09:47"
  03/30/2016 08:09:47
  # ./ipmitool sel get
  03/30/2016 08:09:57

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
2016-04-10 15:57:07 +02:00
Dong Debin
d6ca800da2 ID:430 - Change Nokia Siemens Networks to Nokia Solutions and Networks 2016-03-27 20:28:58 +02:00
Zdenek Styblik
8fe8a5c74c Fix automake compatibility warnings
Commit fixes future compatibility warnings from automake.
2016-03-16 19:41:38 +01:00
Gianfranco Costamagna
9639cb3fa1 Get rid of old INCLUDES macro, use AM_CPPFLAGS instead. 2016-03-15 12:08:23 +01:00
Zdenek Styblik
d65658aacc Remove #if 0 code aka not-compiled-in
Commit removes code which resides in `#if 0` block. Why? Because this code
doesn't get compiled in, so there is no reason for it to be around.
2016-03-14 21:19:52 +01:00
Zdenek Styblik
4648843f81 Remove trailing white-spaces in lib/log.c 2016-03-14 20:37:33 +01:00
Zdenek Styblik
24ebe2fed9 ID:355 - Remove declared, but not used variables
Commit removes bunch of declared, but not used, variables.
2016-03-14 20:19:35 +01:00
Zdenek Styblik
2b8974fb22 ID:355 - Add #include <strings.h> to lib/ipmi_sel.c 2016-03-14 18:56:11 +01:00
Zdenek Styblik
38241decc7 ID:427 - Cleanup comment in ipmi_sdr_get_header()
Commit cleans up comment in ipmi_sdr_get_header() a bit.
2016-03-13 18:21:38 +01:00
Puwen
a6a67e5e9c ID:427 - The first two bytes of dumped raw SDR data is wrong.
When we dumped the raw SDR data, the first Record ID will overwrite by 0x0000
2016-03-13 18:18:29 +01:00
Puwen
ac646c329b ID:428 - Update IANA numbers / Product Name for IBM and ADLINK
Updated ID String of IANA Enterprise numbers for IBM and ADLINK
Updated ID String of ADLINK Products
2016-03-13 18:02:31 +01:00
Jens Nyberg
cacdd1b6ec ID:431 - Fix correct interpretation of led states
The LED state bits are not mutually exclusive. Bit [0] says LEDs can be
controlled locally and the state bit [1] says wheter the default local
settings or the override settings are used. This means that both bits can be
set at the same time.

Bit [2], the lamp test, indicates wether the test is in progress and logically
works the same as [1].

If bit [0] is not set then bit [1] and [2] has no meaning.

Signed-off-by: Jens Nyberg <jens.nyberg@ericsson.com>
2016-03-13 11:54:07 +01:00
Zdenek Styblik
eb5c73c04e ID:355 - Add macros and #include and reduce number of warnings
Commit adds macros and #include in order to bring down the number of `warning:
implicit declaration of function 'X' [-Wimplicit-function-declaration]`
warnings.
2016-03-13 11:40:10 +01:00
BenTech2
55b024f573 ID:424 - Update dimm_spd.c with data from the latest JEDEC List
Commit updates code in 'lib/dimm_spd.c' with the data from the latest JEDEC list.
2016-02-27 14:06:15 +01:00
Zdenek Styblik
e1897e2a1d ID:423 - Don't assume internal use area is present in ekanalyzer
... use information in FRU header instead.

Patch by Hinko Kocevar.
2016-02-27 13:36:40 +01:00
Zdenek Styblik
4e707af583 ID:355 - Move Super Micro stuff into dedicated header file
Commit moves Super Micro stuff into dedicated header file in order to cut down
on compiler warnings. It seems these aren't used elsewhere other than in
'lib/ipmi_sel.c'.
2016-02-27 13:17:29 +01:00
Zdenek Styblik
dc5dead291 ID:414 - ekanalyzer frushow fails to show 'Product Info' correctly
Commit removes redundant fread() which led to 'ekanalyzer frushow' not to show
'Product Info' correctly.
2016-02-27 10:12:06 +01:00
Zdenek Styblik
b8ca3cac3a ID:417 - Fix some typos
Commit fixes typos in texts in code, print-outs, README and man page.

Submitted by Jörg Frings-Fürst
2016-02-27 10:03:44 +01:00
Dmitry Bazhenov
9020b67347 ID:411 - Fix HPM.2 revision check for R1.1 and subsequent specification revisions. 2016-01-20 07:09:44 +01:00
Alexander Yurtsev
f62b924cb4 ID:413 - Print new line chne character when setting user privilege.
The ouput sting on setting user privilege level is missing the trailing new line character.
Add the missing character.
2016-01-19 20:41:58 +01:00
Alexander Yurtsev
8055e0d9fb ID:412 - Check errors when setting a user password.
An error which can happen when setting a user password is silently ignored.
Add a completion code check and report error if any.
2016-01-19 20:40:15 +01:00
Björn Spruck
ac1b3e1d46 ID:404 - Edit FRU information update problem
Targets as a problem with editing FRUs (like ipmitool ....
fru edit 0 field b 0 "blahblah") where the header (multirecord area offset) is
not correctly updated.

It is supposed to modify the header offset to muti-record area if any of
the three previous areas has been edited.

Remark: this has to occur before the new header crc is calculated.
Thats the reson the modification is not close to the actual movement of the
data. Maybe it would be nicer to change the order in the code here. But
I do not want to add undesired behaviour, thus keeping a clear and small
patch.
2015-12-14 07:00:36 +01:00
Martin Wilck
336b2cb1ab ID:405 - Use meaningful Generator ID for "ipmitool sel add"
"ipmitool sel add" always sets the Generator ID field of the generated SEL entry
to 0x0000.

Looking at the IPMI spec v2, §13.2, this is questionable. The value 0 would be
read as a HW-generated event from IPMB with slave address 0, which is the
broadcast or ["general call"]http://www.i2c-bus.org/addressing/ address.

The spec says that the Generator ID should be "Software ID if event was
generated from system software", and goes on to say that bit 0 should be set to
1 and bit 1-7 should be set to the Software ID for software-generated events.
SEL entries generated by ipmitool will usually be software-generated.

Out of the SWIDs defined in §5.5 of the IPMI spec, "System management Software"
or "OEM" would match ipmitool's use best, thus it would make sense to set the
generator ID field to 0x0041 or 0x0061. I am using 0x0041 here.

Signed-off-by: Martin Wilck <martin.wilck@ts.fujitsu.com>
2015-12-09 07:53:13 +01:00
Dmitry Bazhenov
37307c93e9 ID:401 - Fixed 30 second delay when activating SOL on 'dumb' Intel MACs.
Boards equipped with 'dumb' Intel MAC can do only SOL. IPMITool performs
several autodetection requests before initiating SOL, which are not
recognized by the boards. With each request retried 5 times it takes
about 30 seconds to establish SOL. This patch resolves the problem.
2015-11-06 09:27:15 +01:00
Dmitry Bazhenov
c9e3e6a01b ID:397 - Fixed picmg policy set command.
'picmg policy set' command uses too restrictive input values check
which allow setting/clearing only the Activation Locked Bit (#0).
This patch fixes the check to allow setting/clearing Deactivation
Locked Bit (#1) as well.
2015-11-06 09:03:32 +01:00
Dmitry Bazhenov
603c14274a ID:396 - Fixed invalid length check in picmg led cap command.
'picmg led cap' command expects FRU LED Capabilities response
length 5 bytes minimum (excluding the completion code byte),
while it is only 4 bytes long. This patch makes the command
expect 4 bytes instead.
2015-11-06 09:02:15 +01:00
Dmitry Bazhenov
14368335b2 ID:402 - Misguiding error print-out when using some 'lan' commands.
Redundant call for find_lan_channel() for several 'lan' commands
produces misguiding error output. Those commands require expicit
specification of the channel number and calling to find_lan_channel()
for them is useless. For the rest 'lan' commands which allow
ommiting of the channels number, the find_lan_channel() is called
additionally.
2015-11-06 08:59:53 +01:00
Dmitry Bazhenov
c56b5c9667 ID:399 - Fixed channel getciphers command.
'channel getciphers' command uses wrong command-line argument
when parsing the target channel number. This patch fixes
this problem.
2015-11-06 08:53:38 +01:00
Dmitry Bazhenov
718a242205 ID:398 - Fixed channel setaccess command.
'channel setaccess' command uses wrong command-line arguments
to construct the set user access request. This patch fixes
this problem.
2015-11-06 08:52:29 +01:00
Zdenek Styblik
636a785d82 ID:336 - ipmitool does not fall back to IPv4 for IPMI v2 / RMCP+ sessions
Commit implements '-4' and '-6' switch in order to enforce IPv4 or IPv6
connection. In order to do so, struct ipmi_intf has been extended to carry
ai_family flag.
2015-11-05 17:31:54 +01:00
Robert Sworder
c38ecd063f ID:374 - Check/set LED Duration correctly 2015-11-04 13:44:52 +01:00
Alexander Rube
b6d0afb0f6 ID:395 - Fix fru string without resizing it
Editing a fru without resizing it caused the checksum being incorrect and not
being updated. This fix changes this, so the checksum is now being correctly
calculated and written to the right place.
2015-10-26 19:03:35 +01:00
Zdenek Styblik
ffeb535db8 ID:392 - _ipmi_get_user_name() work-around for some BMCs
Commit adds a work-around for some BMCs which return ccode 0xCC when user is
disabled. However, this isn't reason to stop listing users as this ccode is
perceived as being "normal".
When 0xCC is returned, empty user name will be printed instead of bailing out.
2015-10-09 20:53:24 +02:00
Zdenek Styblik
c04aa9bb4e ID:388 - Turn all messages into LOG_INFO in VITA discovery
... because people without VITA support don't care about errors related to VITA
discovery. This has been suggested as a part of the ticket and "copied" after
PICMG discovery.
2015-10-04 15:44:09 +02:00
Zdenek Styblik
329281bbce ID:388 - Handle ccode 0xCC as well in VITA discovery 2015-10-04 15:42:32 +02:00
Alexander Rube
3412d86143 ID:391 - changing data_len from 17 to 16 according to ipmi spec 22.29, first byte is completion code 2015-09-11 06:09:49 +02:00
Zdenek Styblik
a98eedb272 Remove trailing white-spaces in ipmi_user.c 2015-09-11 06:09:25 +02:00
Zdenek Styblik
372b458e0f ID:388 - Fix Error message always printed if BMC does not support VITA
Print error message for 0xC1 to LOG_DEBUG instead of LOG_ERR, because it isn't
an error if VITA isn't supported.
2015-09-11 06:00:44 +02:00
Alexander Rube
0caa68115e ID:389 - Add on of Advantech IANA number 2015-09-02 08:49:35 +02:00
Zdenek Styblik
a5c1120dbb Cleanup trailing white-spaces in ipmi_vita.c 2015-08-26 09:18:35 +02:00
Dmitry Bazhenov
89e9e63443 ID:376 - Add means to configure "Bad Password Threshold"
Add support for setting and printing of the "Bad Password Threshold"
LAN configuration parameter.
2015-08-06 07:28:54 +02:00
Zdenek Styblik
ff80a188f3 ID:382 - Fix memcpy() params in HpmFwupgActionUploadFirmware()
The 'bufLength' variable holds a constant chunk size. If the actual
data length is less than the 'bufLength', then it crashes IPMITool. The
code was already there to calculate the remaining data length, but was
not used in memcpy(). We changed it to use the 'count' variable which
holds the proper available data length.

Commit for: Viswanathan Swaminathan
2015-07-27 06:37:37 +02:00
Zdenek Styblik
c87aa0b96a ID:368 - Fix handling of bridging-related parameters
1. my_addr is not set if an interface does not expose set_my_addr.
   Currently, the only interface which requires some special handling to set
   my_addr is OpenIPMI. But changing of my_addr still needed for other interfaces.
   So, we must set it regardless of presence of set_my_addr().
2. Since set_my_addr() for serial interfaces only sets my_addr, we remove them
   as redundand.
3. Bridging is enabled when either trasit_addr or target_addr is not 0.
   Currentle transit_addr is not regarded.
4. target_lun does not relate to briging. It is needed for "raw" command. We
   set it regardles of bridging.

Commit for: Dmitry Bazhenov
2015-07-25 13:03:37 +02:00
Zdenek Styblik
2d79e69f5f Merge commit '2f5789750183d4ef8be125b8cb32019441dd0530'
Return codes of functions should be either used or evaluated - always. This
merge is necessary for shell scripting to, eg. signal there was an error during
execution.
2015-07-25 10:16:38 +02:00
Pat Donlin
259500e127 ID: 380 raw commands override retry and timeout values
Remove the hard coded override for retry and timeout in ipmi_master_write_read
2015-07-25 09:43:57 +02:00
Pat Donlin
70099a3c40 ID: 380 - raw commands override retry and timeout values
Correct compiler warnings in ipmi_raw.c
2015-07-25 09:43:51 +02:00
Zdenek Styblik
eb54136775 ID:319 - Interface safe re-open
Currently, interface-management code in the ipmitool does not allow safe
interface re-opening (i.e. closing and opening again). It is because the session
is allocated in the interface setup callback while is freed in the close
callback. So, normal re-opening of the interface, which can be required for
example durng the HPM.1 upgrade, leads to segmentation fault. That's why in the
ipmi_hpmfwupg.c instead of normal closing interface, directly access the
interface data for subsequent re-opening.

Commit for Dmitry Bazhenov
2015-03-11 19:41:34 +01:00
Parthasarathy Bhuvaragan
9caa78be38 ID:371 - add ericsson oem
Change-Id: I4fa230b2388e83ae0bc560539675d4dd8783a33e
Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.xx.bhuvaragan@ericsson.com>
2015-02-17 15:43:03 +01:00