summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/mvebu/bubt.c2
-rw-r--r--cmd/net.c9
2 files changed, 6 insertions, 5 deletions
diff --git a/cmd/mvebu/bubt.c b/cmd/mvebu/bubt.c
index 2755c26cdf7..f8e97d03920 100644
--- a/cmd/mvebu/bubt.c
+++ b/cmd/mvebu/bubt.c
@@ -661,7 +661,7 @@ static size_t tftp_read_file(const char *file_name)
*/
image_load_addr = get_load_addr();
ret = net_loop(TFTPGET);
- return ret > 0 ? ret : 0;
+ return ret > 0 ? net_boot_file_size : 0;
}
static int is_tftp_active(void)
diff --git a/cmd/net.c b/cmd/net.c
index 24099764493..f6f556f36ae 100644
--- a/cmd/net.c
+++ b/cmd/net.c
@@ -354,8 +354,8 @@ static int netboot_common(enum proto_t proto, struct cmd_tbl *cmdtp, int argc,
char *const argv[])
{
char *s;
- int rcode = 0;
- int size;
+ int rcode;
+ u32 size;
net_boot_file_name_explicit = false;
*net_boot_file_name = '\0';
@@ -396,8 +396,9 @@ static int netboot_common(enum proto_t proto, struct cmd_tbl *cmdtp, int argc,
}
}
- size = net_loop(proto);
- if (size < 0) {
+ rcode = net_loop(proto);
+ size = net_boot_file_size;
+ if (rcode < 0) {
bootstage_error(BOOTSTAGE_ID_NET_NETLOOP_OK);
return CMD_RET_FAILURE;
}