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>
diff --git a/cmd/pxe_utils.c b/cmd/pxe_utils.c
index c65f1ea..11c2ccf 100644
--- a/cmd/pxe_utils.c
+++ b/cmd/pxe_utils.c
@@ -1451,8 +1451,9 @@
}
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;
}