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>
This commit is contained in:
Simon Glass
2021-10-14 12:47:58 -06:00
committed by Tom Rini
parent b1ead6b908
commit 4ad5d51edb
4 changed files with 10 additions and 5 deletions

View File

@@ -91,7 +91,7 @@ static int do_sysboot(struct cmd_tbl *cmdtp, int flag, int argc,
env_set("bootfile", filename);
}
pxe_setup_ctx(&ctx, cmdtp, NULL);
pxe_setup_ctx(&ctx, cmdtp, NULL, NULL);
if (strstr(argv[3], "ext2")) {
ctx.getfile = do_get_ext2;
} else if (strstr(argv[3], "fat")) {