Hi Simon,

On 11/19/24 2:18 PM, Simon Glass wrote:
This function is far too long. Split out the part which builds and runs
the bootm/i/z commands into its own function.

Add a function comment for the new label_run_boot() function.

Also change a strncpy() to strlcpy() to keep checkpatch happy.

Signed-off-by: Simon Glass <[email protected]>
---

  boot/pxe_utils.c | 284 ++++++++++++++++++++++++++---------------------
  1 file changed, 156 insertions(+), 128 deletions(-)

diff --git a/boot/pxe_utils.c b/boot/pxe_utils.c
index 82f217aaf86..edccb29e770 100644
--- a/boot/pxe_utils.c
+++ b/boot/pxe_utils.c
@@ -433,142 +433,29 @@ skip_overlay:
  #endif
/**
- * label_boot() - Boot according to the contents of a pxe_label
- *
- * If we can't boot for any reason, we return.  A successful boot never
- * returns.
- *
- * The kernel will be stored in the location given by the 'kernel_addr_r'
- * environment variable.
- *
- * If the label specifies an initrd file, it will be stored in the location
- * given by the 'ramdisk_addr_r' environment variable.
- *
- * If the label specifies an 'append' line, its contents will overwrite that
- * of the 'bootargs' environment variable.
+ * label_run_boot() - Set up the FDT and call the appropriate bootm/z/i command
   *
   * @ctx: PXE context
   * @label: Label to process
- * Returns does not return on success, otherwise returns 0 if a localboot
- *     label was processed, or 1 on error
+ * @kernel_addr: String containing kernel address (cannot be NULL)
+ * @initrd_addr_str: String containing initaddr address (NULL if none)

s/initaddr/initrd/

And would have preferred the strncpy/strlcpy swap to not be hidden in the big diff :)

Otherwise,

Reviewed-by: Quentin Schulz <[email protected]>

Cheers,
Quentin

Reply via email to