[PATCH 3/7] pxe_utils: extract per-entry key parsing into parse_label_keys()
Tom Rini
trini at konsulko.com
Thu Jun 4 18:06:08 CEST 2026
On Thu, Jun 04, 2026 at 07:31:08PM +0400, Alexey Charkov wrote:
> Split the body of parse_label() into a standalone parse_label_keys()
> helper that walks key/value lines and populates a pre-existing
> struct pxe_label. parse_label() becomes a thin wrapper that creates
> the label, reads its name, attaches it to the menu, and delegates.
>
> This is a pure refactor: the new helper contains the original loop
> verbatim, with the local variable declarations moved to its scope.
> No call sites or behaviour change.
>
> A subsequent change will export this helper so callers parsing
> formats that lack a 'label' header (notably Boot Loader Specification
> type #2 entries) can populate a label directly from a file body
> without duplicating the parser.
>
> Signed-off-by: Alexey Charkov <alchark at flipper.net>
> ---
> boot/pxe_utils.c | 58 ++++++++++++++++++++++++++++++++++++--------------------
> 1 file changed, 37 insertions(+), 21 deletions(-)
There's no size impact here at, so this is fine.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20260604/95025349/attachment.sig>
More information about the U-Boot
mailing list