summaryrefslogtreecommitdiff
path: root/boot/pxe_utils.c
AgeCommit message (Collapse)Author
2021-11-11pxe: Drop get_bootfile_path()Simon Glass
This function no longer makes sense, since it is pretty easy to prepend the boot directory to the filename. Drop it and update its only caller. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Artem Lapkin <[email protected]> Tested-by: Artem Lapkin <[email protected]> Reviewed-by: Ramon Fried <[email protected]>
2021-11-11pxe: Clean up the use of bootfileSimon Glass
The 'bootfile' environment variable is read in the bowels of pxe_util to provide a directory to which all loaded files are relative. This is not obvious from the API to PXE and it is strange to make the caller set an environment variable rather than pass this as a parameter. The code is also convoluted, which this feature implemented by get_bootfile_path(). Update the API to improve this. Unfortunately this means that pxe_setup_ctx() can fail, so add error checking. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Artem Lapkin <[email protected]> Tested-by: Artem Lapkin <[email protected]> Reviewed-by: Ramon Fried <[email protected]>
2021-11-11pxe: Move common parsing coding into pxe_utilSimon Glass
Both the syslinux and pxe commands use essentially the same code to parse and run extlinux.conf files. Move this into a common function. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Artem Lapkin <[email protected]> Tested-by: Artem Lapkin <[email protected]> Reviewed-by: Ramon Fried <[email protected]>
2021-11-11pxe: Tidy up code style a little in pxe_utilsSimon Glass
There are a few more blank lines than makes sense for readability. Also free() handles a NULL pointer so drop the pointless checks. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Artem Lapkin <[email protected]> Tested-by: Artem Lapkin <[email protected]> Reviewed-by: Ramon Fried <[email protected]>
2021-11-11pxe: Tidy up some comments in pxe_utilsSimon Glass
Some of these functions are a big vague in the comments. Tidy them up a bit. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Artem Lapkin <[email protected]> Tested-by: Artem Lapkin <[email protected]> Reviewed-by: Ramon Fried <[email protected]>
2021-11-11pxe: Move pxe_utils filesSimon Glass
Move the header file into the main include/ directory so we can use it from the bootmethod code. Move the C file into boot/ since it relates to booting. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Artem Lapkin <[email protected]> Tested-by: Artem Lapkin <[email protected]> Reviewed-by: Ramon Fried <[email protected]>