diff options
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2024-01-26 08:54:31 +0100 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2024-01-29 11:31:06 +0100 |
commit | 102ab672d39fb90659dc8464ef77fcc607ba20a5 (patch) | |
tree | 394cf103913833329d7e9ddbdada5f6c7cfa3297 /cmd | |
parent | fa0772180edd404f8ac06fea5bc4f601db1731d6 (diff) |
cmd: in do_efi_capsule_esrt use efi_get_configuration_table
Use library function efi_get_configuration_table() to find the ESRT.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/efidebug.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/cmd/efidebug.c b/cmd/efidebug.c index a3a7556ea4..a587860e2a 100644 --- a/cmd/efidebug.c +++ b/cmd/efidebug.c @@ -173,15 +173,12 @@ EFI_ESRT_UPDATE_STATUS_NUM > (idx) ? efi_update_status_str[(idx)] : "error"\ static int do_efi_capsule_esrt(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[]) { - struct efi_system_resource_table *esrt = NULL; + struct efi_system_resource_table *esrt; if (argc != 1) return CMD_RET_USAGE; - for (int idx = 0; idx < systab.nr_tables; idx++) - if (!guidcmp(&efi_esrt_guid, &systab.tables[idx].guid)) - esrt = (struct efi_system_resource_table *)systab.tables[idx].table; - + esrt = efi_get_configuration_table(&efi_esrt_guid); if (!esrt) { log_info("ESRT: table not present\n"); return CMD_RET_SUCCESS; |