X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=cmd%2Fnet.c;h=1b724cc57090e7ab81eecf750c48157d1fa57ce8;hb=e7882f65f02eca5a7d35871ba0355462bbf7362e;hp=89721b8f8be9aa4f26c3485558440e1311f9737f;hpb=53885e76ce8dca29782b211c2c83ad37c41d798a;p=oweals%2Fu-boot.git diff --git a/cmd/net.c b/cmd/net.c index 89721b8f8b..1b724cc570 100644 --- a/cmd/net.c +++ b/cmd/net.c @@ -9,6 +9,8 @@ */ #include #include +#include +#include #include static int netboot_common(enum proto_t, cmd_tbl_t *, int, char * const []); @@ -185,10 +187,10 @@ static int netboot_common(enum proto_t proto, cmd_tbl_t *cmdtp, int argc, net_boot_file_name_explicit = false; - /* pre-set load_addr */ + /* pre-set image_load_addr */ s = env_get("loadaddr"); if (s != NULL) - load_addr = simple_strtoul(s, NULL, 16); + image_load_addr = simple_strtoul(s, NULL, 16); switch (argc) { case 1: @@ -205,7 +207,7 @@ static int netboot_common(enum proto_t proto, cmd_tbl_t *cmdtp, int argc, */ addr = simple_strtoul(argv[1], &end, 16); if (end == (argv[1] + strlen(argv[1]))) { - load_addr = addr; + image_load_addr = addr; /* refresh bootfile name from env */ copy_filename(net_boot_file_name, env_get("bootfile"), sizeof(net_boot_file_name)); @@ -217,7 +219,7 @@ static int netboot_common(enum proto_t proto, cmd_tbl_t *cmdtp, int argc, break; case 3: - load_addr = simple_strtoul(argv[1], NULL, 16); + image_load_addr = simple_strtoul(argv[1], NULL, 16); net_boot_file_name_explicit = true; copy_filename(net_boot_file_name, argv[2], sizeof(net_boot_file_name)); @@ -226,8 +228,8 @@ static int netboot_common(enum proto_t proto, cmd_tbl_t *cmdtp, int argc, #ifdef CONFIG_CMD_TFTPPUT case 4: - if (strict_strtoul(argv[1], 16, &save_addr) < 0 || - strict_strtoul(argv[2], 16, &save_size) < 0) { + if (strict_strtoul(argv[1], 16, &image_save_addr) < 0 || + strict_strtoul(argv[2], 16, &image_save_size) < 0) { printf("Invalid address/size\n"); return CMD_RET_USAGE; }