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 <[email protected]>
> ---
>  boot/pxe_utils.c | 58 
> ++++++++++++++++++++++++++++++++++++--------------------
>  1 file changed, 37 insertions(+), 21 deletions(-)

There's no size impact here at, so this is fine.

-- 
Tom

Attachment: signature.asc
Description: PGP signature

Reply via email to