[Concept,09/20] boot: Correct filename in bootmeth_common_read_file()

Message ID 20250828020732.981415-10-sjg@u-boot.org
State New
Headers
Series efi: App and devicetree improvements |

Commit Message

Simon Glass Aug. 28, 2025, 2:07 a.m. UTC
  From: Simon Glass <sjg@chromium.org>

This should add the filename provided to the image, not the original
bootflow filename. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 114dd14e38d ("bootmeth: Update the read_file() method to...")
---

 boot/bootmeth-uclass.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/boot/bootmeth-uclass.c b/boot/bootmeth-uclass.c
index 6c0eff7579d..8c191082cf3 100644
--- a/boot/bootmeth-uclass.c
+++ b/boot/bootmeth-uclass.c
@@ -437,7 +437,7 @@  int bootmeth_common_read_file(struct udevice *dev, struct bootflow *bflow,
 		return ret;
 	*sizep = len_read;
 
-	if (!bootflow_img_add(bflow, bflow->fname, type, *addrp, size))
+	if (!bootflow_img_add(bflow, file_path, type, *addrp, size))
 		return log_msg_ret("bci", -ENOMEM);
 
 	return 0;