git: 0a2c8f66919d - stable/14 - libsa: smbios: Rename 64-bit entry point's guards
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 08 Apr 2025 13:41:01 UTC
The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=0a2c8f66919dbf5288faed8a73efd3905aa3d8e3 commit 0a2c8f66919dbf5288faed8a73efd3905aa3d8e3 Author: Olivier Certner <olce@FreeBSD.org> AuthorDate: 2025-03-03 16:52:20 +0000 Commit: Olivier Certner <olce@FreeBSD.org> CommitDate: 2025-04-08 13:38:26 +0000 libsa: smbios: Rename 64-bit entry point's guards Rename HAS_SMBV3 to SMBIOS_64BIT_EP, as it will soon be externally defined in some cases, and 'isv3' to 'is_64bit_ep'. These are more accurate names for what they actually control/indicate. No functional change. Reviewed by: imp, markj MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49281 (cherry picked from commit 2aa0067548a9dd68af263b3154923c0c25d8f600) --- stand/libsa/smbios.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/stand/libsa/smbios.c b/stand/libsa/smbios.c index 4faec8c3aa01..a45bc78b7ad0 100644 --- a/stand/libsa/smbios.c +++ b/stand/libsa/smbios.c @@ -31,7 +31,7 @@ /* Only enable 64-bit entry point if it makes sense */ #if __SIZEOF_POINTER__ > 4 -#define HAS_SMBV3 1 +#define SMBIOS_64BIT_EP 1 #endif /* @@ -144,7 +144,7 @@ SMBIOS_GET64(const caddr_t base, int off) struct smbios_attr { int probed; - caddr_t addr; + caddr_t addr; size_t length; size_t count; int major; @@ -160,8 +160,8 @@ struct smbios_attr { }; static struct smbios_attr smbios; -#ifdef HAS_SMBV3 -static int isv3; +#ifdef SMBIOS_64BIT_EP +static int is_64bit_ep; #endif static uint8_t @@ -189,11 +189,11 @@ smbios_sigsearch(const caddr_t addr, const uint32_t len) smbios_checksum(cp + 0x10, 0x0f) == 0) return (cp); -#ifdef HAS_SMBV3 +#ifdef SMBIOS_64BIT_EP /* v3.0, 64-bit Entry point */ if (strncmp(cp, SMBIOS3_SIG, sizeof(SMBIOS3_SIG) - 1) == 0 && smbios_checksum(cp, SMBIOS_GET8(cp, 0x06)) == 0) { - isv3 = 1; + is_64bit_ep = 1; return (cp); } #endif @@ -561,8 +561,8 @@ smbios_probe(const caddr_t addr) if (saddr == NULL) return; -#ifdef HAS_SMBV3 - if (isv3) { +#ifdef SMBIOS_64BIT_EP + if (is_64bit_ep) { /* Structure Table Length */ smbios.length = SMBIOS_GET32(saddr, 0x0c); /* Structure Table Address */