summaryrefslogtreecommitdiff
path: root/include/ipmitool/ipmi_sdr.h
Commit message (Collapse)AuthorAgeFilesLines
* Use "#pragma once" for headersBing-Hua Wang2021-04-081-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of the header guard names in ipmitool duplicated with the ones in freeipmi. * ipmitool/ipmi_fru.h and freeipmi/fru/ipmi-fru.h both uses IPMI_FRU_H * ipmitool/ipmi_sdr.h and freeipmi/sdr/ipmi-sdr.h both uses IPMI_SDR_H * ipmitool/ipmi_sel.h and freeipmi/sel/ipmi-sel.h both uses IPMI_SEL_H This is problematic as including the 1st will prevent the 2nd from being included, leading to the loss of any declarations, inline definitions, or other "#includes" in the 2nd header. For example, including ipmitool/ipmi_sel.h and freeipmi/freeipmi.h fails to build. $ cat test.c #include <ipmitool/ipmi_sel.h> #include <freeipmi/freeipmi.h> $ gcc test.c -I${HOME}/src/oss/ipmitool/include In file included from /usr/include/freeipmi/freeipmi.h:90, from test.c:2: /usr/include/freeipmi/sdr/oem/ipmi-sdr-oem-intel-node-manager.h:48:44: error: unknown type name 'ipmi_sdr_ctx_t'; did you mean 'ipmi_fru_ctx_t'? 48 | int ipmi_sdr_oem_parse_intel_node_manager (ipmi_sdr_ctx_t ctx, | ^~~~~~~~~~~~~~ | ipmi_fru_ctx_t Remove header guards and use "#pragma once" instead. In this way, we don't have to do manual management to avoid name clashes. * src/plugins/lan/md5.h is left as is being an external header originally. * src/plugins/imb/imbapi.h is a convoluted header consisting of multiple header guards. Let's just add "#pragma once" and leave header guards as is for now. Signed-off-by: Bing-Hua Wang <binghuawang@ami.com>
* sdr: Fix segfault on invalid unit typesAlexander Amelkin2019-05-271-4/+28
| | | | | | | | | | | 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"). Resolves ipmitool/ipmitool#118 Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
* move static objects to source filePatrick Venture2018-11-231-43/+0
| | | | | | | | | Move static objects declared in headers to the source files where they're used. Partially resolves ipmitool/ipmitool#13 Signed-off-by: Patrick Venture <venture@google.com>
* use __UNUSED__ macro instead of gcc specific attributePatrick Venture2018-11-231-2/+2
| | | | | | | | | Use __UNUSED__ macro defined in helper.h instead of the gcc-specific attribute unused macro. Partially resolves ipmitool/ipmitool#13 Signed-off-by: Patrick Venture <venture@google.com>
* [compiler-warnings-fixes] ipmi_sdr.c: remove unused function parametersVernon Mauery2018-11-111-14/+7
| | | | | | | | | | Several functions were passed a struct ipmi_intf* even though it was unused. This removes the unused parameters and changes calls and signatures. Partially resolves ipmitool/ipmitool#13 Signed-off-by: Vernon Mauery <vernon.mauery@intel.com>
* ID:400 - Add support for VITA-specific sensor types and events.Dmitry Bazhenov2016-05-171-5/+6
| | | | | | Reworked event type code/sensor type parsing in order to support VITA-specific extensions. Added VITA-specific sensor-specific event types and VITA-specific sensor types.
* delete duplicate macrosParthasarathy Bhuvaragan2014-09-031-2/+0
| | | | | Change-Id: Ie219c955c4644b8ab9822fd1e5523d70038b5261 Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.xx.bhuvaragan@ericsson.com>
* Move all files one level up in the file hierarcy, to avoid the useless ↵Petter Reinholdtsen2014-02-051-0/+957
ipmitool directory.