pxe: Use a context pointer
authorSimon Glass <sjg@chromium.org>
Thu, 14 Oct 2021 18:47:56 +0000 (12:47 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 12 Nov 2021 00:02:11 +0000 (19:02 -0500)
commitfd3fa5c3941d4de0736d066f77d0158cf933e207
tree3e8291c7ad555000c4c1852c82351cc6e9736542
parent3d24636e925f89841aac4482c8cc372a2b9d96a6
pxe: Use a context pointer

At present the PXE functions pass around a pointer to command-table entry
which is very strange. It is only needed in a few places and it is odd to
pass around a data structure from another module in this way.

For bootmethod we will need to provide some context information when
reading files.

Create a PXE context struct to hold the command-table-entry pointer and
pass that around instead. We can then add more things to the context as
needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Artem Lapkin <email2tema@gmail.com>
Tested-by: Artem Lapkin <email2tema@gmail.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
cmd/pxe.c
cmd/pxe_utils.c
cmd/pxe_utils.h
cmd/sysboot.c