mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
added product name resolution in 'mc info'
This commit is contained in:
parent
c306d08d7e
commit
8aad659697
@ -53,6 +53,9 @@ extern const struct valstr ipmi_integrity_algorithms[];
|
||||
extern const struct valstr ipmi_encryption_algorithms[];
|
||||
extern const struct valstr ipmi_oem_info[];
|
||||
|
||||
/* these are similar, expect that the lookup takes the IANA number
|
||||
as first parameter */
|
||||
extern const struct oemvalstr ipmi_oem_product_info[];
|
||||
extern const struct oemvalstr ipmi_oem_sdr_type_vals[];
|
||||
|
||||
|
||||
|
@ -119,7 +119,7 @@ const char * val2str(uint16_t val, const struct valstr *vs)
|
||||
}
|
||||
|
||||
memset(un_str, 0, 32);
|
||||
snprintf(un_str, 32, "Unknown (0x%x)", val);
|
||||
snprintf(un_str, 32, "Unknown (0x%02X)", val);
|
||||
|
||||
return un_str;
|
||||
}
|
||||
@ -148,7 +148,7 @@ const char * oemval2str(uint16_t oem, uint16_t val,
|
||||
}
|
||||
|
||||
memset(un_str, 0, 32);
|
||||
snprintf(un_str, 32, "OEM reserved #%02x", val);
|
||||
snprintf(un_str, 32, "Unknown (0x%X)", val);
|
||||
|
||||
return un_str;
|
||||
}
|
||||
|
@ -315,6 +315,7 @@ ipmi_mc_get_deviceid(struct ipmi_intf * intf)
|
||||
struct ipmi_rq req;
|
||||
struct ipm_devid_rsp *devid;
|
||||
int i;
|
||||
char *product=NULL;
|
||||
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.msg.netfn = IPMI_NETFN_APP;
|
||||
@ -352,6 +353,15 @@ ipmi_mc_get_deviceid(struct ipmi_intf * intf)
|
||||
printf("Product ID : %u (0x%02x%02x)\n",
|
||||
buf2short((uint8_t *)(devid->product_id)),
|
||||
devid->product_id[1], devid->product_id[0]);
|
||||
|
||||
product=oemval2str(IPM_DEV_MANUFACTURER_ID(devid->manufacturer_id),
|
||||
(devid->product_id[1]<<8)+devid->product_id[0],
|
||||
ipmi_oem_product_info);
|
||||
|
||||
if (product!=NULL) {
|
||||
printf("Product Name : %s\n", product);
|
||||
}
|
||||
|
||||
printf("Device Available : %s\n",
|
||||
(devid->fw_rev1 & IPM_DEV_FWREV1_AVAIL_MASK) ?
|
||||
"no" : "yes");
|
||||
|
@ -68,6 +68,49 @@ const struct valstr ipmi_oem_info[] = {
|
||||
{ 0xffff , NULL },
|
||||
};
|
||||
|
||||
const struct oemvalstr ipmi_oem_product_info[] = {
|
||||
/* Keep OEM grouped together */
|
||||
/* Intel stuff, thanks to Tim Bell */
|
||||
{ IPMI_OEM_INTEL, 0x000C, "TSRLT2" },
|
||||
{ IPMI_OEM_INTEL, 0x001B, "TIGPR2U" },
|
||||
{ IPMI_OEM_INTEL, 0x0022, "TIGI2U" },
|
||||
{ IPMI_OEM_INTEL, 0x0026, "Bridgeport" },
|
||||
{ IPMI_OEM_INTEL, 0x0028, "S5000PAL" },
|
||||
{ IPMI_OEM_INTEL, 0x0029, "S5000PSL" },
|
||||
{ IPMI_OEM_INTEL, 0x0100, "Tiger4" },
|
||||
{ IPMI_OEM_INTEL, 0x0103, "McCarran" },
|
||||
{ IPMI_OEM_INTEL, 0x0800, "ZT5504" },
|
||||
{ IPMI_OEM_INTEL, 0x0808, "MPCBL0001" },
|
||||
{ IPMI_OEM_INTEL, 0x0811, "TIGW1U" },
|
||||
{ IPMI_OEM_INTEL, 0x4311, "NSI2U" },
|
||||
/* Kontron */
|
||||
{ IPMI_OEM_KONTRON,4000, "AM4000 AdvancedMC" },
|
||||
{ IPMI_OEM_KONTRON,4001, "AM4001 AdvancedMC" },
|
||||
{ IPMI_OEM_KONTRON,4002, "AM4002 AdvancedMC" },
|
||||
{ IPMI_OEM_KONTRON,4010, "AM4010 AdvancedMC" },
|
||||
{ IPMI_OEM_KONTRON,5503, "AM4500/4520 AdvancedMC" },
|
||||
{ IPMI_OEM_KONTRON,5504, "AM4300 AdvancedMC" },
|
||||
{ IPMI_OEM_KONTRON,5507, "AM4301 AdvancedMC" },
|
||||
{ IPMI_OEM_KONTRON,5508, "AM4330 AdvancedMC" },
|
||||
{ IPMI_OEM_KONTRON,5703, "RTM8020" },
|
||||
{ IPMI_OEM_KONTRON,5704, "RTM8030" },
|
||||
{ IPMI_OEM_KONTRON,6000, "CP6000" },
|
||||
{ IPMI_OEM_KONTRON,6006, "DT-64" },
|
||||
{ IPMI_OEM_KONTRON,6010, "CP6010" },
|
||||
{ IPMI_OEM_KONTRON,6011, "CP6011" },
|
||||
{ IPMI_OEM_KONTRON,6012, "CP6012" },
|
||||
{ IPMI_OEM_KONTRON,6014, "CP6014" },
|
||||
{ IPMI_OEM_KONTRON,5002, "AT8001" },
|
||||
{ IPMI_OEM_KONTRON,5003, "AT8010" },
|
||||
{ IPMI_OEM_KONTRON,5004, "AT8020" },
|
||||
{ IPMI_OEM_KONTRON,5006, "AT8030 IPMC" },
|
||||
{ IPMI_OEM_KONTRON,2025, "AT8030 MMC" },
|
||||
{ IPMI_OEM_KONTRON,5301, "AT8400" },
|
||||
{ IPMI_OEM_KONTRON,5303, "AT8901" },
|
||||
|
||||
{ 0xffff , 0xffff , NULL },
|
||||
};
|
||||
|
||||
const struct oemvalstr ipmi_oem_sdr_type_vals[] = {
|
||||
/* Keep OEM grouped together */
|
||||
{ IPMI_OEM_KONTRON , 0xC0 , "OEM Firmware Info" },
|
||||
|
Loading…
x
Reference in New Issue
Block a user