ID:348 Add support for the "System Firmware Version"

Add support for the "System Firmware Version" parameter selector (1) to the "Get
System Info Parameters" command ("mc getsysinfo system_fw_version"). The "mc
getsysinfo" command was already implemented and supported, but strangely, only
standard parameter selecter values 2, 3, 4 and Dell-defined parameters were
supported; the standard parameter value 1 (system firmare version) was not
supported.
This commit is contained in:
Zdenek Styblik 2014-12-05 14:15:02 +01:00
parent 7cd86aaf1e
commit aaf98b89d5
2 changed files with 7 additions and 0 deletions

View File

@ -157,6 +157,9 @@ struct ipm_get_watchdog_rsp {
#define IPMI_SYSINFO_SET0_SIZE 14 #define IPMI_SYSINFO_SET0_SIZE 14
#define IPMI_SYSINFO_SETN_SIZE 16 #define IPMI_SYSINFO_SETN_SIZE 16
/* System Information "Parameter selector" values: */
#define IPMI_SYSINFO_SET_STATE 0x00
#define IPMI_SYSINFO_SYSTEM_FW_VERSION 0x01
#define IPMI_SYSINFO_HOSTNAME 0x02 #define IPMI_SYSINFO_HOSTNAME 0x02
#define IPMI_SYSINFO_PRIMARY_OS_NAME 0x03 #define IPMI_SYSINFO_PRIMARY_OS_NAME 0x03
#define IPMI_SYSINFO_OS_NAME 0x04 #define IPMI_SYSINFO_OS_NAME 0x04

View File

@ -216,6 +216,8 @@ printf_sysinfo_usage(int full_help)
lprintf(LOG_NOTICE, ""); lprintf(LOG_NOTICE, "");
lprintf(LOG_NOTICE, " Valid arguments are:"); lprintf(LOG_NOTICE, " Valid arguments are:");
} }
lprintf(LOG_NOTICE,
" system_fw_version System firmware (e.g. BIOS) version");
lprintf(LOG_NOTICE, lprintf(LOG_NOTICE,
" primary_os_name Primary operating system name"); " primary_os_name Primary operating system name");
lprintf(LOG_NOTICE, " os_name Operating system name"); lprintf(LOG_NOTICE, " os_name Operating system name");
@ -914,6 +916,8 @@ sysinfo_param(const char *str, int *maxset)
else if (!strcmp(str, "delloem_url")) { else if (!strcmp(str, "delloem_url")) {
*maxset = 2; *maxset = 2;
return IPMI_SYSINFO_DELL_URL; return IPMI_SYSINFO_DELL_URL;
} else if (!strcmp(str, "system_fw_version")) {
return IPMI_SYSINFO_SYSTEM_FW_VERSION;
} }
return (-1); return (-1);