mirror of
https://github.com/ipmitool/ipmitool.git
synced 2026-06-03 20:51:36 +00:00
mc: Fix manufacturer ID masking
A potential future problem has been identified in the manufacturer ID processing code for `mc info` command. Only 16 of 24 bits were used. This is fixed now. Also added support for ID 0x0FFFFF, the 'reserved' value as per IPMI specification. It is now reported as 'Unspecified' unlike other non-listed IDs that are still reported as 'Unknown'. ID 0xFFFFFE is used for debugging purposes in hope that IANA won't reach that number of entities any soon. If it will though, then IANA's assignment will take precedence. Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
This commit is contained in:
@@ -260,6 +260,8 @@ struct ipmi_rs {
|
||||
|
||||
typedef enum IPMI_OEM {
|
||||
IPMI_OEM_UNKNOWN = 0,
|
||||
IPMI_OEM_DEBUG = 0xFFFFFE, /* Hoping IANA won't hit this soon */
|
||||
IPMI_OEM_RESERVED = 0x0FFFFF, /* As per IPMI 2.0 specification */
|
||||
/* 2 for [IBM] */
|
||||
IPMI_OEM_IBM_2 = 2,
|
||||
IPMI_OEM_HP = 11,
|
||||
|
||||
@@ -92,8 +92,8 @@ struct ipm_devid_rsp {
|
||||
#define IPM_DEV_IPMI_VERSION_MINOR(x) \
|
||||
((x & IPM_DEV_IPMI_VER_MINOR_MASK) >> IPM_DEV_IPMI_VER_MINOR_SHIFT)
|
||||
|
||||
#define IPM_DEV_MANUFACTURER_ID_MASK 0x0FFFFF
|
||||
#define IPM_DEV_MANUFACTURER_ID(x) (ipmi24toh(x) & IPM_DEV_MANUFACTURER_ID_MASK)
|
||||
#define IPM_DEV_MANUFACTURER_ID_RESERVED 0x0FFFFF
|
||||
#define IPM_DEV_MANUFACTURER_ID(x) ipmi24toh(x)
|
||||
|
||||
#define IPM_DEV_ADTL_SUPPORT_BITS (8)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user