mirror of
https://xff.cz/git/u-boot/
synced 2025-11-01 10:56:02 +01:00
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>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user