pxe: Tidy up the is_pxe global

Move this into the context to avoid a global variable. Also rename it
since the current name does not explain what it actually affects.

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:59 -06:00 committed by Tom Rini
parent 4ad5d51edb
commit 8018b9af57
4 changed files with 15 additions and 16 deletions

View file

@ -65,8 +65,6 @@ static int do_sysboot(struct cmd_tbl *cmdtp, int flag, int argc,
char *filename;
int prompt = 0;
is_pxe = false;
if (argc > 1 && strstr(argv[1], "-p")) {
prompt = 1;
argc--;
@ -91,7 +89,7 @@ static int do_sysboot(struct cmd_tbl *cmdtp, int flag, int argc,
env_set("bootfile", filename);
}
pxe_setup_ctx(&ctx, cmdtp, NULL, NULL);
pxe_setup_ctx(&ctx, cmdtp, NULL, NULL, true);
if (strstr(argv[3], "ext2")) {
ctx.getfile = do_get_ext2;
} else if (strstr(argv[3], "fat")) {