diff options
author | Simon Glass | 2021-10-14 12:48:11 -0600 |
---|---|---|
committer | Tom Rini | 2021-11-11 19:02:43 -0500 |
commit | d50244e9d8583378770392fb429a0283b2b47885 (patch) | |
tree | 61dff7a6190c6f17c4a9bede54043fafc221fa41 /include/pxe_utils.h | |
parent | 37c5195dfcd15781db9e9f7f414611dc1af3bd2e (diff) |
pxe: Allow calling the pxe_get logic directly
Refactor this code so that we can call the 'pxe get' command without going
through the command-line interpreter. This makes it easier to get the
information we need, without going through environment variables.
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>
Diffstat (limited to 'include/pxe_utils.h')
-rw-r--r-- | include/pxe_utils.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/pxe_utils.h b/include/pxe_utils.h index 194a5ed8cc7..b7037f841a6 100644 --- a/include/pxe_utils.h +++ b/include/pxe_utils.h @@ -236,4 +236,18 @@ int pxe_process(struct pxe_context *ctx, ulong pxefile_addr_r, bool prompt); */ int pxe_get_file_size(ulong *sizep); +/** + * pxe_get() - Get the PXE file from the server + * + * This tries various filenames to obtain a PXE file + * + * @pxefile_addr_r: Address to put file + * @bootdirp: Returns the boot filename, or NULL if none. This is the 'bootfile' + * option provided by the DHCP server. If none, returns NULL. For example, + * "rpi/info", which indicates that all files should be fetched from the + * "rpi/" subdirectory + * @sizep: Size of the PXE file (not bootfile) + */ +int pxe_get(ulong pxefile_addr_r, char **bootdirp, ulong *sizep); + #endif /* __PXE_UTILS_H */ |