[Concept,06/26] boot: pxe: Make pxe_prepare() static and document it

Message ID 20260110202906.187370-7-sjg@u-boot.org
State New
Headers
Series boot: pxe: Add three-phase API and fix memory leaks |

Commit Message

Simon Glass Jan. 10, 2026, 8:28 p.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

This function is only used within pxe_utils.c so make it static. Add
documentation while we are here.

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
---

 boot/pxe_utils.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
  

Patch

diff --git a/boot/pxe_utils.c b/boot/pxe_utils.c
index 9444effbb6a..b55d736beb8 100644
--- a/boot/pxe_utils.c
+++ b/boot/pxe_utils.c
@@ -1282,8 +1282,18 @@  void pxe_destroy_ctx(struct pxe_context *ctx)
 	free(ctx->bootdir);
 }
 
-struct pxe_menu *pxe_prepare(struct pxe_context *ctx, ulong pxefile_addr_r,
-			     bool prompt)
+/**
+ * pxe_prepare() - Prepare a PXE menu by parsing and processing includes
+ *
+ * Parses the PXE config file and processes any include directives.
+ *
+ * @ctx: PXE context
+ * @pxefile_addr_r: Address where config file is loaded
+ * @prompt: true to force the menu prompt
+ * Return: Parsed menu on success, NULL on error
+ */
+static struct pxe_menu *pxe_prepare(struct pxe_context *ctx,
+				    ulong pxefile_addr_r, bool prompt)
 {
 	struct pxe_menu *cfg;
 	int ret;