From b3eb2e4f6e807ac22d98ba0f6b33452b72cbe109 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Sat, 15 Apr 2023 16:43:04 +0300 Subject: [PATCH] drivers/ipmi: Replace with MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To use generated build.h one should have had a pre-requisite in the Makefile. Reference coreboot_version from lib/version.c instead. Change-Id: I7f10acabf1838deb90fde8215a32718028096852 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/74446 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber Reviewed-by: Felix Held --- src/drivers/ipmi/supermicro_oem.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/drivers/ipmi/supermicro_oem.c b/src/drivers/ipmi/supermicro_oem.c index c63da5f020..fcf97f4254 100644 --- a/src/drivers/ipmi/supermicro_oem.c +++ b/src/drivers/ipmi/supermicro_oem.c @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include "ipmi_supermicro_oem.h" #define IPMI_NETFN_OEM 0x30 @@ -20,7 +20,6 @@ struct ipmi_oem_set_bios_str { static void set_coreboot_ver(const uint16_t kcs_port) { - const char *coreboot_ver = COREBOOT_VERSION; struct ipmi_oem_set_bios_str bios_ver; struct ipmi_rsp rsp; int ret; @@ -28,9 +27,9 @@ static void set_coreboot_ver(const uint16_t kcs_port) /* Only 8 characters are visible in UI. Cut of on first dash */ for (i = 0; i < 15; i++) { - if (coreboot_ver[i] == '-') + if (coreboot_version[i] == '-') break; - bios_ver.str[i] = coreboot_ver[i]; + bios_ver.str[i] = coreboot_version[i]; } bios_ver.str[i] = 0; bios_ver.ver = IPMI_LUN0_AC_SET_BIOS_VER; @@ -50,7 +49,7 @@ static void set_coreboot_date(const uint16_t kcs_port) struct ipmi_rsp rsp; int ret; - strncpy(bios_ver.str, COREBOOT_DMI_DATE, 15); + strncpy(bios_ver.str, coreboot_dmi_date, 15); bios_ver.str[15] = 0; bios_ver.ver = IPMI_LUN0_AC_SET_BIOS_DATE;