From eb9401e3ebfa6a1550522be28895af461137f797 Mon Sep 17 00:00:00 2001 From: wdenk Date: Mon, 11 Nov 2002 02:11:37 +0000 Subject: * Patch by Andreas Oberritter, 09 Nov 2002: Change behaviour of NetLoop(): return -1 for errors, filesize otherwise; return code 0 is valid an means no file loaded - in this case the environment still gets updated! * Patches by Jon Diekema, 9 Nov 2002: - improve ADC/DAC clocking on the SACSng board to align the failing edges of LRCLK and SCLK - sbc8260 configuration tweaks - add status LED support for 82xx systems - wire sspi/sspo commands into command handler; improved error handlering - add timestamp support and alternate memory test to the SACSng configuration --- common/cmd_net.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'common/cmd_net.c') diff --git a/common/cmd_net.c b/common/cmd_net.c index c9ce85ffe3..a1ff2ba9a6 100644 --- a/common/cmd_net.c +++ b/common/cmd_net.c @@ -132,12 +132,16 @@ netboot_common (int proto, cmd_tbl_t *cmdtp, int argc, char *argv[]) return 1; } - if ((size = NetLoop(proto)) == 0) + if ((size = NetLoop(proto)) < 0) return 1; /* NetLoop ok, update environment */ netboot_update_env(); + /* done if no file was loaded (no errors though) */ + if (size == 0) + return 0; + /* flush cache */ flush_cache(load_addr, size); -- cgit