On Sat, 19 Oct 2024 at 18:22, Simon Glass <s...@chromium.org> wrote: > > The efiload_read_file() does similar things to a common function, so > update it to use that instead. > > Signed-off-by: Simon Glass <s...@chromium.org> > --- > > Changes in v2: > - Change the tag to bootmeth_efi > > boot/bootmeth_efi.c | 11 +++-------- > 1 file changed, 3 insertions(+), 8 deletions(-) > > diff --git a/boot/bootmeth_efi.c b/boot/bootmeth_efi.c > index 2ad6d3b4ace..f3ddbe71405 100644 > --- a/boot/bootmeth_efi.c > +++ b/boot/bootmeth_efi.c > @@ -110,19 +110,14 @@ static void set_efi_bootdev(struct blk_desc *desc, > struct bootflow *bflow) > static int efiload_read_file(struct bootflow *bflow, ulong addr) > { > struct blk_desc *desc = NULL; > - loff_t bytes_read; > + ulong size; > int ret; > > if (bflow->blk) > desc = dev_get_uclass_plat(bflow->blk); > - ret = bootmeth_setup_fs(bflow, desc); > - if (ret) > - return log_msg_ret("set", ret); > > - ret = fs_read(bflow->fname, addr, 0, bflow->size, &bytes_read); > - if (ret) > - return log_msg_ret("read", ret); > - bflow->buf = map_sysmem(addr, bflow->size); > + ret = bootmeth_common_read_file(bflow->method, bflow, bflow->fname, > + addr, &size); > > set_efi_bootdev(desc, bflow); > > -- > 2.34.1 > Acked-by: Ilias Apalodimas <ilias.apalodi...@linaro.org>
- [PATCH v2 09/31] dm: core: Add a function to see if a ... Simon Glass
- [PATCH v2 11/31] bootstd: Move bootflow-adding to boot... Simon Glass
- [PATCH v2 13/31] bootstd: Add a function to get bootst... Simon Glass
- [PATCH v2 14/31] bootstd: Drop the bootdev-specific li... Simon Glass
- [PATCH v2 12/31] bootstd: Move bootflow-clearing to bo... Simon Glass
- [PATCH v2 15/31] bootstd: Move the bootflow list into ... Simon Glass
- [PATCH v2 18/31] test: boot: Update bootflow_iter() fo... Simon Glass
- [PATCH v2 21/31] bootstd: Update bootmeth_alloc_file()... Simon Glass
- [PATCH v2 22/31] boot: pxe: Drop the duplicate comment... Simon Glass
- [PATCH v2 23/31] bootmeth_efi: Simplify reading files ... Simon Glass
- Re: [PATCH v2 23/31] bootmeth_efi: Simplify readi... Ilias Apalodimas
- [PATCH v2 28/31] Update bootmeth_alloc_other() to reco... Simon Glass
- [PATCH v2 27/31] boot: Update pxe bootmeth to record i... Simon Glass
- [PATCH v2 25/31] bootmeth_efi: Check the filename-allo... Simon Glass
- [PATCH v2 30/31] bootstd: Update cros bootmeth to reco... Simon Glass
- [PATCH v2 24/31] bootmeth: Update the read_file() meth... Simon Glass
- Re: [PATCH v2 24/31] bootmeth: Update the read_fi... Mattijs Korpershoek
- [PATCH v2 31/31] bootstd: Add a simple command to list... Simon Glass
- [PATCH v2 20/31] bootstd: Maintain a list of images Simon Glass
- [PATCH v2 19/31] bootstd: cros: Correct the x86-setup ... Simon Glass
- [PATCH v2 26/31] boot: Update extlinux pxe_getfile_fun... Simon Glass