[PATCH v3 08/11] efi_loader: move file-system helpers to efi_app_common

Simon Glass sjg at chromium.org
Wed Jul 1 14:00:00 CEST 2026


On 2026-06-28T08:27:58, Heinrich Schuchardt
<heinrich.schuchardt at canonical.com> wrote:
> efi_loader: move file-system helpers to efi_app_common
>
> Move the shared file-system utilities to efi_app_common:
>
> * open_file_system() - open the simple file system protocol, first
>   trying the partition the image was loaded from, then the UEFI system
>   partition.
> * get_config_table()  - look up an EFI configuration table by GUID.
> * save_file()         - write a buffer to a named file, prompting for
>   confirmation if the file already exists.
>
> get_config_table() supersedes the private get_dtb() in dtbdump and
> get_dbg_info() in dbginfodump; both call-sites are updated to use it.
>
> dtbdump's do_save() and initrddump's do_save() are simplified to use
> the common save_file(), eliminating duplicate file-open/write/close
> sequences.
>
> smbiosdump's private get_config_table(), open_file_system() and
> save_file() are removed; the common versions take their place.
> [...]
>
> lib/efi_loader/dbginfodump.c    |  22 +------
>  lib/efi_loader/dtbdump.c        | 120 ++------------------------------------
>  lib/efi_loader/efi_app_common.c | 106 ++++++++++++++++++++++++++++++++++
>  lib/efi_loader/efi_app_common.h |  32 ++++++++++
>  lib/efi_loader/initrddump.c     |  69 ++--------------------
>  lib/efi_loader/smbiosdump.c     | 125 ----------------------------------------
>  6 files changed, 147 insertions(+), 327 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list