mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-11 11:07:23 +00:00
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>
47 lines
1.2 KiB
C
47 lines
1.2 KiB
C
/*
|
|
* Copyright (c) Pigeon Point Systems. All right reserved
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
/* VITA 46.11 commands */
|
|
#define VITA_GET_VSO_CAPABILITIES_CMD 0x00
|
|
#define VITA_FRU_CONTROL_CMD 0x04
|
|
#define VITA_GET_FRU_LED_PROPERTIES_CMD 0x05
|
|
#define VITA_GET_LED_COLOR_CAPABILITIES_CMD 0x06
|
|
#define VITA_SET_FRU_LED_STATE_CMD 0x07
|
|
#define VITA_GET_FRU_LED_STATE_CMD 0x08
|
|
#define VITA_SET_FRU_STATE_POLICY_BITS_CMD 0x0A
|
|
#define VITA_GET_FRU_STATE_POLICY_BITS_CMD 0x0B
|
|
#define VITA_SET_FRU_ACTIVATION_CMD 0x0C
|
|
#define VITA_GET_FRU_ADDRESS_INFO_CMD 0x40
|
|
|
|
/* VITA 46.11 site types */
|
|
#define VITA_FRONT_VPX_MODULE 0x00
|
|
#define VITA_POWER_ENTRY 0x01
|
|
#define VITA_CHASSIS_FRU 0x02
|
|
#define VITA_DEDICATED_CHMC 0x03
|
|
#define VITA_FAN_TRAY 0x04
|
|
#define VITA_FAN_TRAY_FILTER 0x05
|
|
#define VITA_ALARM_PANEL 0x06
|
|
#define VITA_XMC 0x07
|
|
#define VITA_VPX_RTM 0x09
|
|
#define VITA_FRONT_VME_MODULE 0x0A
|
|
#define VITA_FRONT_VXS_MODULE 0x0B
|
|
#define VITA_POWER_SUPPLY 0x0C
|
|
#define VITA_FRONT_VITA62_MODULE 0x0D
|
|
#define VITA_71_MODULE 0x0E
|
|
#define VITA_FMC 0x0F
|
|
|
|
|
|
#define GROUP_EXT_VITA 0x03
|
|
|
|
extern uint8_t
|
|
vita_discover(struct ipmi_intf *intf);
|
|
|
|
extern uint8_t
|
|
ipmi_vita_ipmb_address(struct ipmi_intf *intf);
|
|
|
|
extern int
|
|
ipmi_vita_main(struct ipmi_intf * intf, int argc, char ** argv);
|