diff options
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2024-01-31 23:49:34 +0100 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2024-02-02 19:57:45 +0100 |
commit | 406c410ef747d66e16f2f5494cbf88ba1307224f (patch) | |
tree | d1d299e98db982d1379cb1d2a009e1c437dbb454 /lib/efi_loader/smbiosdump.c | |
parent | e494258deddcae4a6805abfbb643b2fdc8ac3736 (diff) |
smbios: correctly name Structure Table Maximum Size field
In the SMBIOS 3 entry point the Structure Table Maximum Size field was
incorrectly named max_struct_size. A Maximum Structure Size field only
exists in the SMBIOS 2.1 entry point and has a different meaning.
Call the Structure Table Length field table_maximum_size.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Diffstat (limited to 'lib/efi_loader/smbiosdump.c')
-rw-r--r-- | lib/efi_loader/smbiosdump.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/efi_loader/smbiosdump.c b/lib/efi_loader/smbiosdump.c index f0b901897e..2f0b91a353 100644 --- a/lib/efi_loader/smbiosdump.c +++ b/lib/efi_loader/smbiosdump.c @@ -329,7 +329,7 @@ efi_status_t do_check(void) return EFI_LOAD_ERROR; } table = (void *)(uintptr_t)smbios3_anchor->struct_table_address; - len = smbios3_anchor->max_struct_size; + len = smbios3_anchor->table_maximum_size; } else { struct smbios_entry *smbios_anchor; int r; @@ -469,7 +469,7 @@ static efi_status_t do_save(u16 *filename) smbios3_anchor = get_config_table(&smbios3_guid); if (smbios3_anchor) { - size = 0x20 + smbios3_anchor->max_struct_size; + size = 0x20 + smbios3_anchor->table_maximum_size; ret = bs->allocate_pool(EFI_LOADER_DATA, size, (void **)&buf); if (ret != EFI_SUCCESS) { error(u"Out of memory\n"); @@ -480,7 +480,7 @@ static efi_status_t do_save(u16 *filename) memcpy(buf, smbios3_anchor, smbios3_anchor->length); memcpy(buf + 0x20, (void *)(uintptr_t)smbios3_anchor->struct_table_address, - smbios3_anchor->max_struct_size); + smbios3_anchor->table_maximum_size); smbios3_anchor = (struct smbios3_entry *)buf; smbios3_anchor->struct_table_address = 0x20; |