1559 Commits

Author SHA1 Message Date
Zdenek Styblik
8c5013b0ba ID: 101 - 'lib/ipmi_sol.c' - possible int *flow
Fix function name - str2uint() -> str2uchar().
2013-07-18 03:10:55 +00:00
Zdenek Styblik
ea8ce15131 ID: 70 - Fixes and updates for ipmitool hpm
Fixed the hpm upgstatus command to print the results of the command
without having to specify -v to enable verbose operation.

It's not clear that this command is even useful to the user at all.
Perhaps it should be removed entirely.

Commit for Dan Gora
2013-07-17 10:45:56 +00:00
Zdenek Styblik
6d89531096 ID: 70 - Fixes and updates for ipmitool hpm
We now will print the decoded strings as well as the error value for
error response codes from the target.

Commit for Dan Gora
2013-07-17 10:42:19 +00:00
Zdenek Styblik
e56e914866 ID: 70 - Fixes and updates for ipmitool hpm
Update the help menu for the ipmitool hpm command.  Fix the formatting
and explain better the options.

Changed the option 'upgrade <file> all' to 'upgrade <file> force'.
This makes it clearer that the user is overriding the version check
that 'upgrade <file>' performs.

Commit for Dan Gora
2013-07-17 10:38:48 +00:00
Zdenek Styblik
cee8fc659a ID: 70 - Fixes and updates for ipmitool hpm
Added a new field to show the Deferred firmware version value as part
of the 'hpm check' subcommand.

The deferred firmware version is the version of the firmware which has
been loaded with the 'hpm upgrade' command, but not yet activated.

Commit for Dan Gora
2013-07-17 10:36:07 +00:00
Zdenek Styblik
25fa0f80ae ID: 70 - Fixes and updates for ipmitool hpm
There is no point in putting the size of things in hex.

Commit for Dan Gora
2013-07-17 10:32:56 +00:00
Zdenek Styblik
22e38bc46f ID: 70 - Fixes and updates for ipmitool hpm
Fixed a bug where the rolling percentage display could corrupt the
version line if the first call to HpmDisplayUpgrade resulted in a
non-zero percentage.

This was produced by performing:

ipmitool hpm upgrade hpm1fru.img

where hpm1fru.img is a small (820 byte) file.

We now call HpmDisplayUpgrade before we transfer any data to ensure
that we get 0% printed before the transfer starts.

Commit for Dan Gora
2013-07-17 10:30:23 +00:00
Zdenek Styblik
3bd53a2f78 ID: 70 - Fixes and updates for ipmitool hpm
Add two additional chars to the component name string.  For the
default Pigeon Point firmware names we need a couple of extra chars
to actually be able to tell what component is which.

Before:
-----------------------------------------------------
|ID | Name      |             Versions              |
|   |           |     Active      |     Backup      |
-----------------------------------------------------
|*0 |H8S-AMCc F/|   2.00 10000000 |   2.00 0F000000 |
| 1 |H8S-AMCc B/|   2.00 00000000 | ---.-- -------- |
| 2 |H8S-AMCc F/|   2.00 10000000 | ---.-- -------- |
-----------------------------------------------------

After:
--------------------------------------------------------
|ID  | Name        |             Versions              |
|    |             |     Active      |     Backup      |
--------------------------------------------------------
|*  0|H8S-AMCc F/W |   2.00 10000000 |   2.00 0F000000 |
|   1|H8S-AMCc B/L |   2.00 00000000 | ---.-- -------- |
|   2|H8S-AMCc F/I |   2.00 10000000 | ---.-- -------- |
--------------------------------------------------------

Commit for Dan Gora
2013-07-17 10:25:28 +00:00
Zdenek Styblik
30e4efe8a4 ID: 70 - Fixes and updates for ipmitool hpm
Added a '^' character to the ID field which will be set if the
component can be upgraded with the specified file with the 'hpm check
<file>' subcommand.

Commit for Dan Gora
2013-07-17 10:22:37 +00:00
Zdenek Styblik
bf8acad458 ID: 70 - Fixes and updates for ipmitool hpm
Update HpmfwupgPreUpgradeCheck to check if the Aux version is also
different when it compares the Image version to the active and
rollback versions.

Fixed the indenting and style of HpmfwupgPreUpgradeCheck to make it
more readable.

Commit for Dan Gora
2013-07-17 10:19:43 +00:00
Zdenek Styblik
2db7f5f6b9 ID: 259 - small memory leak in ipmi_user.c
Commit fixes a small memory leak in 'lib/ipmi_user.c' via strdup().
One typo got fixed in the process.
2013-07-16 17:41:19 +00:00
Zdenek Styblik
71dea69efc Squash white spaces in 'lib/ipmi_dcmi.c'
Commit squashes white spaces in 'lib/ipmi_dcmi.c'. Tabulators are used for
indentation now. I've tried to clean up comments, long lines, trailing white
spaces and tabs, code formatting. However, more work is needed especially in
ipmi_dcmi_main() where indentation level is reaching one too many.

No functional changes.
2013-07-16 11:07:24 +00:00
Zdenek Styblik
9f51d8f188 ID: 256 - ipmitool could crash when IPv6 address is returned
gethostbyname() can't handle IPv6. Despite this fact it seems worth of
nothing to check whether gethostbyname() really returned AF_INET or
not. And that's what attached patch does, resp. in case IPv6 is
returned then ipmitool shoud/will terminate.
2013-07-16 04:17:39 +00:00
Zdenek Styblik
8a40297308 ID: 257 ipmitool exec segfaults if invalid input given
Commit mitigates segfault in 'exec'/ipmishell when
invalid input is given. Code expects another _'_ or _"_ to come, but
if it doesn't, it ends up r/w unallocated memory.
2013-07-16 04:12:09 +00:00
Zdenek Styblik
fb5d8559e6 ID: 101 - 'lib/ipmi_sol.c' - possible int *flow
Don't make ref out of ref -> segfault.
2013-07-13 03:51:49 +00:00
Zdenek Styblik
2a260d32e9 ID: 260 - ipmi_user.c - replace atoi() call
Commit replaces deprecated atoi() call.
2013-07-12 12:35:19 +00:00
Zdenek Styblik
94c0bd0a6c ID: 101 - 'lib/ipmi_sol.c' - possible int *flow
Commit replaces unhandled strtol() calls with appropriate str2*() functions and
wrappers.

Reported-by: Duncan Idaho
2013-07-12 12:06:08 +00:00
Zdenek Styblik
3cb937f15e Use tabs instead of white spaces for indentation in 'lib/ipmi_chassis.c'. 2013-07-10 04:22:12 +00:00
Marie-Josee Blais
edc700ed9a Added code to support sensors on other luns (On behalf of Kontron Germany) 2013-07-09 12:25:12 +00:00
Zdenek Styblik
287b313e26 ID: 113 - delloem exec file won't handle more than one command
Commit fixes issue with 'delloem' subcommands being executed via 'exec'. State
of variable 'current_arg' is kept between calls which leads to incorrect argv
parsing.
Set variable 'current_arg' every time ipmi_delloem_main() is called.
2013-07-09 11:10:03 +00:00
Zdenek Styblik
47d53000ce ID: 211 - 'lib/ipmi_dcmi.c' - typo & error printed on STDOUT
Commit fixes couple typos and replaces incorrect printf() calls with appropriate
lprintf() ones.
2013-07-09 05:00:42 +00:00
Zdenek Styblik
66399810f0 ID: 153 - 'lib/ipmi_firewall.c' - printf() used instead of lprintf()
Commit adds printf_firewall_info_usage().
2013-07-09 04:32:33 +00:00
Zdenek Styblik
0ab78dbf02 ID: 153 - 'lib/ipmi_firewall.c' - printf() used instead of lprintf()
Use lprintf() for error/help messages.
2013-07-09 04:20:17 +00:00
Zdenek Styblik
c048c9f311 ID: 93 - 'lib/ipmi_firewall.c' - str-to-int conversion is weak
Commit does:
* adds is_ipmi_channel_num() in 'lib/helper.c' for IPMI Channel validation
* replaces unhandled strtol() calls in 'lib/ipmi_firewall.c'
2013-07-09 03:42:37 +00:00
Zdenek Styblik
c32228d7c1 ID: 226 - 'lib/ipmi_sdradd.c' - typo
Fix I2c -> I2C.
2013-07-08 09:55:29 +00:00
Zdenek Styblik
a855c37619 ID: 258 - ipmi_sdradd.c - error printed on STDOUT
Commit changes printf("...") -> lprintf(LOG_ERR, "...");
2013-07-08 09:54:08 +00:00
Zdenek Styblik
6a66405177 ID: 226 - 'lib/ipmi_sdradd.c' - redundant newline
Commit removes redundant new-lines from error messages in 'lib/ipmi_sdradd.c'.
2013-07-08 09:51:03 +00:00
Zdenek Styblik
4a4331ef6d ID: 255 Fix some typos in ipmitool.1 (Debian Bug #554348)
Commit fixes couple typos in ipmitool's man page.

Commit for Stéphane Aulery
2013-07-08 08:42:55 +00:00
Zdenek Styblik
41288eb5e4 ID: 161 - documentation
Commit contains following documentation changes and related code usage changes:
* sorted arguments
* sorted command line commands
* adds missing arguments
* adds hidden aliases arguments with note of deprecation (feel free to remove if
  not deprecated)
* fixes incomplete synopsis
* restructures synopsis to logical blocks
* conditional argument and command combination overrides to fixed defaults

Commit for Ales Ledvinka
2013-07-08 08:29:20 +00:00
Zdenek Styblik
dbd2db71f2 ID: 253 - Fix lanplus retransmission
Retransmission of lanplus request is broken. ipmi_lanplus_send_payload() keeps
current timeout in local variable 'timeout' and increases it by one with each
retransmission. But ipmi_lan_poll_recv() waits for response for session->timeout
seconds, which is not incremented -> the request is retransmitted only once,
when timeout and session->timeout equals. No other retransmissions are ever
sent.

In addition, the time is measured in seconds, therefore 'time(NULL) - ltime'
often equals 'timeout' and retransmission should be sent in this case (i.e.
'xmit' should be set).

Commit for Jan Safranek
2013-07-07 15:28:13 +00:00
Zdenek Styblik
a472c382f4 ID: 254 - Fix retry of authentication capabilities retrieval
When lan or lanplus session is being opened, ipmi_get_auth_capabilities_cmd() is
called twice. Now that we have -R and -N options it's not necessary to have such
weird code, especially with comment ``I'm not sure why we accept a failure for
the first call''.

Commit for Jan Safranek
2013-07-07 15:22:10 +00:00
Zdenek Styblik
e8125c2405 ID: 244 - "0.0" displayed for unspecified threshold values
Not all SEL entries have a "threshold value" specified, yet ipmitool sel elist
always displays a threshold value (as "0.0"), even when one is not specified.

Commit for Rob Swindell
2013-07-07 12:42:42 +00:00
Zdenek Styblik
c0f41fa647 ID: 28 - 'lib/ipmi_delloem.c' - clean up the code
ipmi_macinfo() - return (-1) on error
2013-07-07 12:07:21 +00:00
Zdenek Styblik
5c74d2935e ID: 28 - 'lib/ipmi_delloem.c' - clean up the code
ipmi_delloem_lan_main() - return (-1) on error.
2013-07-07 12:06:21 +00:00
Zdenek Styblik
cd6b7039f0 ID: 28 - 'lib/ipmi_delloem.c' - clean up the code
ipmi_powermgmt_clear - remove pointless if-else
Set clearType to 1 by default, so there is no need for if-else anymore.
2013-07-07 12:05:11 +00:00
Zdenek Styblik
b4cb02a4d9 ID: 28 - 'lib/ipmi_delloem.c' - clean up the code
Remove `` )'' - white space.
2013-07-07 12:03:42 +00:00
Zdenek Styblik
91fdb17260 ID: 28 - 'lib/ipmi_delloem.c' - clean up the code
Don't ``function ()'' - remove white space.
2013-07-07 12:02:05 +00:00
Zdenek Styblik
2302e83db5 ID: 28 - 'lib/ipmi_delloem.c' - clean up the code
ipmi_lcd_set_single_line_text - invalid retval - Return (-1) on error as
specified instead of 1.
2013-07-07 11:58:13 +00:00
Zdenek Styblik
b0294b96fd ID: 28 - 'lib/ipmi_delloem.c' - clean up the code
pmi_macinfo_drac_idrac_mac - simplify - Return immediately if NicNum doesn't
meet expectations or UseVirtualMacAddress isn't 0.
2013-07-07 11:56:47 +00:00
Zdenek Styblik
f1f2cbb18b ID: 28 - 'lib/ipmi_delloem.c' - clean up the code
ipmi_macinfo_drac_virtual_mac - simplify - Return immediately if NicNum doesn't
meet expectations.
2013-07-07 11:54:36 +00:00
Zdenek Styblik
eb65a625a2 ID: 28 - 'lib/ipmi_delloem.c' - clean up the code
ipmi_lcd_get_info - simplify - Remove pointless ``if () { } else { }'' and
return immediately on error.
2013-07-07 11:52:06 +00:00
Zdenek Styblik
516fe51505 ID: 28 - 'lib/ipmi_delloem.c' - clean up the code
ipmi_lcd_get_info_wh - simplify - Remove pointless ``if () { } else { }'' and
return immediately on error.
2013-07-07 11:49:19 +00:00
Zdenek Styblik
5d5251f7da ID: 28 - 'lib/ipmi_delloem.c' - clean up the code
ipmi_get_power_consumption_data - simplify - If rsp is NULL or ccode is not 0,
then return immediately.
2013-07-07 11:47:49 +00:00
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