
Dear Andreas,
in message 1036801446.610.50.camel@nadell you wrote:
attached is a patch which changes the behaviour of NetLoop().
More tests will have to be done, but I think your patch is correct. Also, it probably fixes the problems reported by Steven Scholz.
Steven, can you please report your test resutls?
The current version of u-boot stops executing the commandline before tftpboot, because the bootp command returns an error, when NetLoop() returns zero.
Currently NetLoop returns the loaded file size or zero on failure. If you do not load a file, then file size stays zero and will be interpreted as a failure, too. This also prevents netboot_update_env() from being called in cmd_net.c.
This patch changes the behaviour so that NetLoop returns -1 on error. Zero and positive integers can then be handled as the file size correctly.
Makes sense to me.
It also removes a warning in list.h. ;)
Funny - my compiler didn't warn. Are you running a 3.x compiler? But you are right anyway.
Thanks a lot!
Best regards,
Wolfgang Denk