[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dmidecode] [PATCH] dmidecode: Add support for SMBIOS3 EFI table
From: |
Jean Delvare |
Subject: |
[dmidecode] [PATCH] dmidecode: Add support for SMBIOS3 EFI table |
Date: |
Wed, 29 Apr 2015 11:07:58 +0200 |
The SMBIOS v3 entry point has a different identifier in the EFI systab.
Add support for it, as well as 64-bit addresses.
---
dmidecode.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
--- dmidecode.orig/dmidecode.c
+++ dmidecode/dmidecode.c
@@ -4680,7 +4680,7 @@ static int legacy_decode(u8 *buf, const
*/
#define EFI_NOT_FOUND (-1)
#define EFI_NO_SMBIOS (-2)
-static int address_from_efi(size_t *address)
+static int address_from_efi(off_t *address)
{
FILE *efi_systab;
const char *filename;
@@ -4704,12 +4704,13 @@ static int address_from_efi(size_t *addr
{
char *addrp = strchr(linebuf, '=');
*(addrp++) = '\0';
- if (strcmp(linebuf, "SMBIOS") == 0)
+ if (strcmp(linebuf, "SMBIOS3") == 0
+ || strcmp(linebuf, "SMBIOS") == 0)
{
- *address = strtoul(addrp, NULL, 0);
+ *address = strtoull(addrp, NULL, 0);
if (!(opt.flags & FLAG_QUIET))
- printf("# SMBIOS entry point at 0x%08lx\n",
- (unsigned long)*address);
+ printf("# %s entry point at 0x%08llx\n",
+ linebuf, (unsigned long long)*address);
ret = 0;
break;
}
@@ -4726,7 +4727,7 @@ int main(int argc, char * const argv[])
{
int ret = 0; /* Returned value */
int found = 0;
- size_t fp;
+ off_t fp;
int efi;
u8 *buf;
--
Jean Delvare
SUSE L3 Support
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [dmidecode] [PATCH] dmidecode: Add support for SMBIOS3 EFI table,
Jean Delvare <=