Renamed the oem strings containing Newisys to Viking Enterprise Solutions.
IANA 9237
Built and tested with AMI's IPMI stack LTS 12.01.
Resolvesipmitool/ipmitool#124
Signed-off-by: dan mcgee <dan.mcgee@vikingenterprise.com>
Signed-off-by: dan mcgee <dan.mcgee@sanmina.com>
Prior to 95038ba01b99153de870dde91406bdc1c7265217 the default interface
was 'open' for builds where it was available and 'lan' otherwise. Due to
a logic error in 95038ba01b99153de870dde91406bdc1c7265217, the default
interface was always getting set to lan unless it was specified by the
environment variable. This commit fixes the logic and sets the default
to open if it is available and lan otherwise.
Resolvesipmitool/ipmitool#128
Tested: ./configure # no options reports 'open' as default
./configure --enable-intf-open=no # reports lan as default
./configure --enable-intf-dbus DEFAULT_INTF=dbus # reports dbus
Signed-off-by: Vernon Mauery <vernon.mauery@intel.com>
Add `chassis bootmbox` command to set and get Boot Initiator Mailbox
boot parameter (id 7) the easy way. The command allows for getting
and setting the data both in hex and text modes, as well as properly
decodes IANA Enterprise number for block 0. It can get/set the whole
mailbox at once or operate on separate data blocks.
This commit enhances the chassis_get_boot_param() function with extra
arguments to re-use its code in handling of the added command.
Documentation update will follow.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Get/set system boot option commands have some command-specific
completion codes that are now reported as "Unknown (0080)", etc.
Use the previously introduced specific_val2str() to convert those
specific error codes to human-readable strings.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Some commands may return command-specific completion codes.
Now they are all reported as 'Unknown'.
Add helper functions to support such command-specific codes.
Command handlers will need to define their own valstr arrays
with completion code descriptions and then use specific_val2str()
instead of generic val2str() to convert the completion code into
a string.
Also reduce code duplication in helper.c
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
The function converts a set of command line arguments representing
byte values into a byte buffer and verifies each individual value
to be a valid data byte.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
The manpage contained a lot of redundant .RS/.RE tag pairs
with no content between the tags. This commits removes those.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
On a failed download of the PEN list, the create_pen_list script
improperly printed an invalid entry of { , "" } causing the build to
fail. The last line print must check that it has something to print or
it will print the wrong thing.
Partially resolvesipmitool/ipmitool#11
Signed-off-by: Vernon Mauery <vernon.mauery@intel.com>
Move boot information acknowledgement clearing code into
a helper funcion, call it instead of copy-pasted code.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Get rid of repeated code that sets the set-in-progress parameter.
Introduce chassis_bootparam_set_in_progress() function to do
the job.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
The program would crash if the BMC returned an out of range (>90)
unit type for a full sensor record. This commit adds a range check
and also add support for IPMI 2.0 additional unit types 91 and 92
("fatal error" and "grams").
Resolvesipmitool/ipmitool#118
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Resolvesipmitool/ipmitool#46
Most modern systems do not require ipmi.service to load the kernel
modules. Checking for /dev/ipmi* would be sufficient.
v2: Use Assert in place of Condition to explicitly fail based on
AlexanderAmelkin's feedback.
Signed-off-by: Charles Rose <charles.rose@dell.com>
In some cases, the user may want to have a different default interface
without the need to always specify it on the command line. Add a
configure option that sets the default interface without the need to
patch the code.
Configure as: ./configure DEFAULT_INTF=name
where name is an interface name that might be enabled with
--enable-intf-<name>.
The configure will enforce that the selected default interface is
enabled.
Signed-off-by: Vernon Mauery <vernon.mauery@intel.com>
By default the D-Bus interface is not enabled, so in order to get it to
build in Travis, it must be enabled explicitly. This installs the
packages needed and sets the configure flag.
Signed-off-by: Vernon Mauery <vernon.mauery@intel.com>
OpenBMC runs a D-Bus interface internally and has the option of
compiling ipmitool so it can run natively on the BMC. This adds the
D-Bus interface to ipmitool so it can be used with the OpenBMC project.
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
The endian.h header is not used for anything and was earlier
added by mistake. It however hampers building on some systems
where it doesn't exist.
Resolvesipmitool/ipmitool#101
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Swap calls to free() with calls to free_n() to leverage helper method
and handle clearing pointers after freeing in one step.
Signed-off-by: Patrick Venture <venture@google.com>
Check the received IPMI response message id against
the id expected given the IPMI request. They need to
match. It is possible that request A times out,
request B is sent, and then request A responds to the
request B. The value for request B may be behind it
in the queue.
Note: This may only be possible if the file is kept
open between multiple IPMI messages (a common
occurrence).
Resolves: #82
Signed-off-by: Patrick Venture <venture@google.com>
Apply whitespace fixes via clang-format-6.0 to src/plugins/open/open.c
to cleanup spaces and fixup line lengths, etc.
Signed-off-by: Patrick Venture <venture@google.com>
Make the argument to free_n() compatible with any pointers,
thus reducing the number of compilation warnings.
End-user-impact: None
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Swap calls to free() with calls to free_n() to leverage helper method
and handle clearing pointers after freeing in one step.
Signed-off-by: Patrick Venture <venture@google.com>
Check against FRU_AREA_MAXIMUM_BLOCK_SZ instead of FRU_BLOCK_SZ
when checking if the write chunk needs to be reduced.
Apparently, that was the original intention, and then there
was just a typo. In other places the same check is done properly.
Signed-off-by: Patrick Venture <venture@google.com>
Change ipmi_fru_query_new_value to return the bool type
instead of an int that's being used as a boolean value.
Signed-off-by: Patrick Venture <venture@google.com>
Add fru_cc_rq2big helper method to reduce duplicate
code checking for specific size-based IPMI response
codes.
Signed-off-by: Patrick Venture <venture@google.com>
Cleanup style in method ipmi_fru_oemkontron_get as well as add inverted
logic checks to reduce indentation.
Signed-off-by: Patrick Venture <venture@google.com>
Fixup the following array bounds checking bugs:
[lib/ipmi_fru.c:1003]: (style) Array index 'i' is
used before limits check.
[lib/ipmi_fru.c:1127]: (style) Array index 'i' is
used before limits check.
[lib/ipmi_fru.c:1262]: (style) Array index 'i' is
used before limits check.
Signed-off-by: Patrick Venture <venture@google.com>
For `sol activate` the timeout on lanplus interface was hard-coded
to 1 second, overriding the value set with the `-N` option.
Resolvesipmitool/ipmitool#87
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
free_n() will free the memory and clear the pointer, which will reduce
the probability a developer will forget to clear the pointer after
freeing.
Resolves: #79
Signed-off-by: Patrick Venture <venture@google.com>
For Win32/Cygwin, the imb plugin was failing to build with
the following message:
imbapi.h:140:9: error: unknown type name 'wchar_t'
typedef wchar_t WCHAR;
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>