diff options
Diffstat (limited to 'cmd/efi_common.c')
-rw-r--r-- | cmd/efi_common.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/cmd/efi_common.c b/cmd/efi_common.c new file mode 100644 index 00000000000..c46764e6eea --- /dev/null +++ b/cmd/efi_common.c @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Common code for EFI commands + * + * Copyright 2023 Google LLC + * Written by Simon Glass <sjg@chromium.org> + */ + +#include <efi.h> +#include <efi_api.h> +#include <uuid.h> + +void efi_show_tables(struct efi_system_table *systab) +{ + int i; + + for (i = 0; i < systab->nr_tables; i++) { + struct efi_configuration_table *tab = &systab->tables[i]; + + printf("%p %pUl %s\n", tab->table, tab->guid.b, + uuid_guid_get_str(tab->guid.b) ?: "(unknown)"); + } +} |