1366 Commits

Author SHA1 Message Date
Zdenek Styblik
5819b314af ID: 28 - 'lib/ipmi_delloem.c' - clean up the code
Remove unnecessary if() from ipmi_print_power_cnsmpt_history().
2013-07-07 11:43:10 +00:00
Zdenek Styblik
630934cb89 ID: 28 - 'lib/ipmi_delloem.c' - clean up the code
ipmi_get_sd_card_info - return (-1) if no SD card is present.
2013-07-07 11:41:27 +00:00
Zdenek Styblik
d44be6e5f5 ID: 28 - 'lib/ipmi_delloem.c' - clean up the code
Don't prefix error message with extra white space(s).
2013-07-07 11:39:15 +00:00
Zdenek Styblik
078ff3a04e ID: 28 - 'lib/ipmi_delloem.c' - clean up the code
lprintf() doesn't need '\n', so don't give it one.
2013-07-07 11:34:59 +00:00
Zdenek Styblik
865c435b4c ID: 28 - 'lib/ipmi_delloem.c' - clean up the code
ipmi_delloem_vFlash_process() - use two lprintf() calls instead of one combined.
2013-07-07 11:29:23 +00:00
Zdenek Styblik
1d9dd4e2de ID: 28 - 'lib/ipmi_delloem.c' - clean up the code
Re-format all usage functions.
2013-07-07 11:28:00 +00:00
Zdenek Styblik
e95a4cf998 ID: 28 - 'lib/ipmi_delloem.c' - clean up the code
Don't ``printf (...)'' -> ``printf(...)''.
2013-07-07 11:26:45 +00:00
Zdenek Styblik
38f89a449d ID: 28 - 'lib/ipmi_delloem.c' - clean up the code
Use lprintf() instead of printf() for error messages.
2013-07-07 11:24:45 +00:00
Zdenek Styblik
64e0b9ab64 ID: 239 - typo in 'mc selftest', add details
Commit fixes a typo and adds details to 'mc selftest' command.

Commit for Rob Swindell
2013-06-10 04:14:21 +00:00
Zdenek Styblik
e30f3726a6 ID: 143 - Reversed 'channel authcap' capabilities
Commit fixes reversed IPMIv1.5/2.0 'channel authcap' capabilities
in 'include/ipmitool/ipmi_channel.h'.

Commit for Rob Swindell
2013-06-10 04:05:54 +00:00
Zdenek Styblik
63ba1cc610 ID: 3587318 - "dcmi discover" is not DCMI 1.5 compatible
Command "dcmi discover" fails with ``ERROR! This command is not available on this
platform'' unless the DCMI implementation advertises DCMI 1.0 or 1.1 conformance.
This means command will fail DCMI 1.5 capable hardware. Commit fixes this issue.

Commit for Rob Swindell
2013-06-02 13:19:57 +00:00
Zdenek Styblik
384618d1bc ID: 3612237 - If DCMI command fails, incorrect completion code is printed
If any DCMI command fails, the function chk_rsp() in ipmi_dcmi.c displays the
incorrect byte as the completion code.

$ ipmitool dcmi power activate
DCMI request failed because: Unspecified error (dc)

The "dc" value printed is actually the "Group extension identification" byte
which *always* has the value 0xdc for DCMI responses.

Commit for Rob Swindell
2013-06-02 12:58:47 +00:00
Zdenek Styblik
b0020e0bae ID: 3612382 - Typos in 'dcmi' help output
Commit fixes typos in DCMI help output.

Commit for Rob Swindell
2013-06-02 12:51:05 +00:00
Zdenek Styblik
7a861ffba6 ID: 3612371 - Typo in impi_sel debug output
IANA is decimal, so don't prefix it with '0x'.

Commit for Rob Swindell
2013-06-02 12:45:01 +00:00
Zdenek Styblik
811da1307a ID: 3612372 - Recognize Broadcom IANA number and BCM5725 product
Commit adds BCM IANA and BCM5725 product number.

Commit for Rob Swindell
2013-06-02 12:38:23 +00:00
Zdenek Styblik
8489426a63 ID: 3608003 - 'lib/ipmi_fru.c' - atol() should be replaced with str2*()
Commit replaces atol() calls with str2int() ones in 'lib/ipmi_fru.c'.
2013-06-02 12:27:41 +00:00
Zdenek Styblik
dbe514a558 ID: 3613042 - add missing Entity IDs
Commit adds missing Entity IDs as defined by 43.14 Entity IDs, IPMI
Specification, V2.0, Markup for Addendum, Rev. 4.

Reported-by: Ulrich Windl
2013-06-02 12:24:36 +00:00
Zdenek Styblik
d5ab51f2cd ID: 3611905 - Direct Serial Basic/Terminal Mode Interface drivers
The patch adds support for direct serial interface drivers (Terminal and Basic
mode).
Despite both drivers implement single and double bridging, it doesn't work at
the moment. Making this functionality to work depends on outcome of
ID#3611226(?).

Commit for Dmitry Bazhenov
2013-05-28 07:38:55 +00:00
Zdenek Styblik
0cea01e42f ID: 3611254 - OEM handle for Intel 82751 in SPT mode
Intel 82751 MAC has several deviations in its RMCP+ implementation while working
in the super pass-through mode.
This patch adds a OEM handle which allows IPMItool succesfully interract with
boards equipped with this NIC.

Commit for Dmitry Bazhenov
2013-05-28 04:18:22 +00:00
Zdenek Styblik
38d71179e9 ID: 3613575 - memory leak - ipmi_password_file_read()
Commit fixes memory leak in ipmi_password_file_read() in 'lib/ipmi_main.c'.
2013-05-23 03:34:14 +00:00
Zdenek Styblik
cc48c433fd ID: 3522740 - reading password from file is limited to 16byte passwords
Commit fixes switched values(const<->size) passed to memset().
2013-05-22 13:51:40 +00:00
Zdenek Styblik
51dd9cf1f0 ID: 3613605 - 'lib/ipmi_main.c' - call free() on pointer to static data
getpass() and getpassphrase() library functions return pointer to a static
data array. When free() is called on such pointer, it abnormally terminates
application.

Commit for Dmitry Bazhenov
2013-05-22 10:16:59 +00:00
Zdenek Styblik
44247a8743 ID: 3522740 - reading password from file is limited to 16byte passwords
Reading password from file is no longer limited to 16bytes.

Reported-by: Dune Idaho
2013-05-22 10:05:06 +00:00
Zdenek Styblik
d82a29d813 ID: 3528308 - 'lib/ipmi_hpmfwupg.c' - possible int *flow
Commit replaces strtol() calls with str2uchar() ones in order to mitigate
possible *flow via user input.
Also, limits are applied to 'Component ID' and 'Properties selector' now.

Reported-by: Dune Idaho
2013-05-22 09:50:10 +00:00
Zdenek Styblik
c5324e879c ID: 3528371 - 'lib/ipmi_sensor.c' - possible int *flow
Commit replaces strtod() calls with str2double() ones in order to mitigate
possible *flow via user input.

Reported-by: Dune Idaho
2013-05-22 09:45:30 +00:00
Zdenek Styblik
a8f6341728 ID: 3528310 - 'lib/ipmi_picmg.c' - possible int *flow
Commit replaces atoi() and strtoul() calls with wrappers in order to prevent
possible int *flow via user input.
Also, limits on user provided values are applied wherever possible.

Reported-by: Dune Idaho
2013-05-18 06:31:02 +00:00
Zdenek Styblik
7472986e1c ID: 3528310 - add str2char(), move is_fru_id() into 'lib/helper.c'
Commit adds new function str2char() into 'lib/helper.c'. Also, function
is_fru_id() moves from 'lib/ipmi_fru.c' into 'lib/helper.c' in order to be
utilized by other modules.
2013-05-18 06:08:13 +00:00
Jim Mankovich
72dd3edde4 "Bridging fixes for PICMG Platforms. Interface is always opened prior to
first IPMI request.  Addition of macro to determine necessity of sensor
bridging and PICMG target address discover.   See ID: 3611226"
2013-05-06 14:08:56 +00:00
Jim Mankovich
cf6740b3f6 Add missing newlines when cvs output is specified see ID 3611912 for details 2013-04-26 20:52:43 +00:00
Zdenek Styblik
14e26ac8a0 ID: 3611253 - configure.in - do not override OS-default values for interfaces
Commit fixes bug where OS default values were over-ridden if the corresponding
enable/disable arguments weren't provided via command-line parameters.
Commit also changes IPMI shell default configuration setting from 'yes' to
'auto'.

Commit for Dmitry Bazhenov
2013-04-26 19:16:31 +00:00
Zdenek Styblik
cee211da31 ID: 3611253 - configure.in - fixed build for the newer autotool releases
Commit for Dmitry Bazhenov
2013-04-25 08:50:53 +00:00
Zdenek Styblik
3818c0d296 ID: 3611253 - Don't print AUX info if IPMC returns 12byte Get Device ID response
Commit for Dmitry Bazhenov
2013-04-25 08:40:56 +00:00
Zdenek Styblik
ae05861b62 ID: 3611253 - 'lib/ipmi_sel.c' - avoid reading of uninitialized data
Zero data before making request in order to avoid reading of uninitialized data
in ipmi_sel_add_entry().

Commit for Dmitry Bazhenov
2013-04-25 08:29:45 +00:00
Zdenek Styblik
c29cf4bcd3 ID: 3611303 - 'src/plugins/lan/lan.c' - error check is missing braces
Fixed a bug where connecting to a remote shelf manager via the lan
interface would always fail with:

``Activate Session error: Session sequence out of range Error: Unable
to establish LAN session''

This is due to a bug introduced in get_random() by fix for ID#3600963 where
braces were missing from an error check.

Commit for Dan Gora
2013-04-25 07:50:45 +00:00
Zdenek Styblik
723e3da037 ID: 3611306 - 'lib/ipmi_tsol.c' - fix always fail in case of error
Commit fixes bug introduced by fix for ID#3600946 where
an error case was missing braces, so it would always fail.

Commit for Dan Gora
2013-04-25 07:43:07 +00:00
Zdenek Styblik
c72afa37ee ID: 3608760 - Add bswap.h to ipmi_chassis.c and ipmi_pef.c
ID: 3564701 - ipmitool 1.8.12 doesn't build on big endian architectures

Compilation would fail on big endian architecture because BSWAP_32 was not
defined in 'ipmi_chassis.c' and 'ipmi_pef.c'.

The problem was '#include <ipmitool/bswap.h>' depended on WORDS_BIGENDIAN which
comes from '<config.h>'. However, none of the previous header files
would include '<config.h>', so it remained undefined.

'bswap.h' gets included unconditionally now.

Commit for Dan Gora
2013-04-25 07:34:44 +00:00
Zdenek Styblik
fa5bdb2f3d ID: 3608765 - improve debug output in ipmi_ekanalyzer_fru_file2structure()
Format the records a little more clearly by adding offsets.

Commit for Dan Gora
2013-04-23 07:28:53 +00:00
Zdenek Styblik
49784a9ec8 ID: 3608765 - Fix indentation of ipmi_ek_create_amc_p2p_record()
Commit changes indentation and formatting in ipmi_ek_create_amc_p2p_record().

Commit for Dan Gora
2013-04-22 11:12:11 +00:00
Zdenek Styblik
d1d404fef4 ID: 3608765 - Fix signed offset in ipmi_ekanalyzer_fru_file2structure
If the offset was greater than 127, then the multi_offset would end
up being a negative value, which is not what we want.

Commit for Dan Gora
2013-04-22 10:31:50 +00:00
Zdenek Styblik
de1dee44bd ID: 3608765 - ipmi_ekanalyzer_fru_file2structure would return error
ipmi_ekanalyzer_fru_file2structure would return ERROR_STATUS even if
it finished sucessfully.

Commit for Dan Gora
2013-04-22 10:18:11 +00:00
Zdenek Styblik
e1728327f6 ID: 3608765 - Fix printing in ipmi_ek_display_amc_p2p_record()
Change the amc channel descriptor ports to be displayed in decimal
instead of hex. This matches the 'fru -v' output in ipmitool.

Add decimal value of Link Asymetric Match values. So people don't have to
look up the value in the source or in the PIGMG spec.

Commit for Dan Gora
2013-04-22 10:05:53 +00:00
Zdenek Styblik
3b77db9a86 ID: 3608765 - ipmi_ekanalyzer.c - fix reading amc channel and link descriptors
Due to a bug in gcc where unaligned bit fields were not packed correctly
before gcc 4.4, we changed the fru_picmgext_amc_channel_desc_record
and fru_picmgext_amc_link_desc_record structures to use
larger types to be packed correctly. This then requires
us to use the FRU_PICMGEXT_AMC_CHANNEL_DESC_RECORD_SIZE and
FRU_PICMGEXT_AMC_LINK_DESC_RECORD_SIZE defines instead of sizeof for
these structures.

Updated ipmi_ek_create_amc_p2p_record() and
ipmi_ek_display_amc_p2p_record() to read data in the correct byte order
on both big and little endian machines.

Commit for Dan Gora
2013-04-22 09:50:53 +00:00
Zdenek Styblik
2abad0e504 ID: 3608757 - ipmi_fru.h/ipmi_fru.c - various fixes
Fixed several bugs with printing out the Carrier and AMC connectivity
information with 'ipmitool -v fru'

There were several bugs that were caused due to using bitfields with
char types in ipmi_fru.h. GCC versions before v4.4 had a bug where
they did not pack the bitfields correctly if the bitfields were not
cleanly aligned with the underlying char type.

Fixed and cleaned up all other PICMG FRU records.

Commit for Dan Gora
2013-04-22 08:37:13 +00:00
Zdenek Styblik
0411186443 ID: 3608765 - Fixed big endian bug in ipmi_ek_display_carrier_connectivity.
Fixed a bug where the carrier connectivity point to point descriptor
was not being displayed properly when compiled on big endian machines.

Commit for Dan Gora
2013-04-18 08:45:50 +00:00
Zdenek Styblik
1e96d20277 ID: 3608765 - Fixed bug reading length in fru info on big endian machines
Fixed bugs in ipmi_ek_display_chassis_info_area(),
ipmi_ek_display_product_info_area(), and
ipmi_ekanalyzer_fru_file2structure() where fread was being called to
read one byte of data into a int or long data type. This would result
in the value being byte swapped since the byte was read into the most
significant byte of the int (ie byte 0) on big endian machines.

Commit for Dan Gora
2013-04-18 08:27:33 +00:00
Zdenek Styblik
de4de4fc96 ID: 3608765 - Fixed bug in ipmi_ek_display_board_info_area()
Previous versions were not setting the file_offset properly if a Custom
board type was found, which would prevent subsequent dissectors from
operating properly and terminating the output of 'ipmitool ekanalyze
frushow oc=<atca carrier fruinfo>' early.

Rewrote ipmi_ek_display_board_info_area() to fix indentation and
to properly set the file_offset and end the while loop if a Custom
board_type was found.

Previous versions were also abusing the board_length variable,
treating it as an int and using it to break out of the loop.

Commit for Dan Gora
2013-04-18 07:57:26 +00:00
Zdenek Styblik
4299cfa385 ID: 3608765 - 'lib/ipmi_ekanalyzer.c' - reverse checks to reduce indentation
Rewrote ipmi_ek_display_chassis_info_area,
ipmi_ek_display_product_info_area, and
ipmi_ekanalyzer_fru_file2structure to reverse the checks of error
conditions to reduce the amount of indentation required.

Commit for Dan Gora
2013-04-15 11:33:17 +00:00
Zdenek Styblik
184994586e ID: 3608763 - 'lib/ipmi_sdr.c' - update main help
Commit updates main help of 'lib/ipmi_sdr.c'. Changes:
* LOG_ERR -> LOG_NOTICE
* add error messages, eg. Invalid command, Not enough parameters etc.
* handle 'sdr fill INV_PARAM'
* return codes on error
* general fixes and changes of SDR help output

Reported-by: Dan Gora
2013-04-15 08:24:13 +00:00
Zdenek Styblik
692861f292 ID: 3608763 - 'lib/ipmi_sdr.c' - fix 'nosats' -> 'nosat'
I forgot to modify size of compared string passed to strncmp() while changing
'nosats' to 'nosat'.
2013-04-12 14:52:14 +00:00
Zdenek Styblik
39408ea589 ID: 3608763 - ipmi_sdr_print_type() print error if sensor not found
'sdr type <TYPE_OF_SENSOR>' - print error message if sensor of given type
was not found.

Commit for Dan Gora
2013-04-12 13:11:26 +00:00