aboutsummaryrefslogtreecommitdiff
path: root/cmd/pxe_utils.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-10-14 12:47:58 -0600
committerTom Rini <trini@konsulko.com>2021-11-11 19:02:18 -0500
commit4ad5d51edb6525402b371cc8f8a3bee1b6a42414 (patch)
tree8d7cf5b3c60dbd9bc53b3ec59d6874e5c354b381 /cmd/pxe_utils.c
parentb1ead6b9087f1f96cb117d72e3e5cf0d5fb708f5 (diff)
pxe: Add a userdata field to the context
Allow the caller to provide some info which is passed back to the readfile() method. 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 'cmd/pxe_utils.c')
-rw-r--r--cmd/pxe_utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/pxe_utils.c b/cmd/pxe_utils.c
index c65f1eaf5c..11c2ccfd71 100644
--- a/cmd/pxe_utils.c
+++ b/cmd/pxe_utils.c
@@ -1451,8 +1451,9 @@ void handle_pxe_menu(struct pxe_context *ctx, struct pxe_menu *cfg)
}
void pxe_setup_ctx(struct pxe_context *ctx, struct cmd_tbl *cmdtp,
- pxe_getfile_func getfile)
+ pxe_getfile_func getfile, void *userdata)
{
ctx->cmdtp = cmdtp;
ctx->getfile = getfile;
+ ctx->userdata = userdata;
}