[U-Boot] tftp command return value
Simon Glass
sjg at chromium.org
Tue Jun 3 05:01:12 CEST 2014
Hi,
On 1 June 2014 22:32, l3iggs . <l3iggs at live.com> wrote:
> Hello,
>
> I'd like to test if a file on my TFTP server exists. I would expect that using 'if tftp filename.ext; then echo exists; else echo doesnt; fi' woudl work here. However, It always shows that the file exists. I expect that others want to do the same thing because grep -r "if tftp" include/configs/ gives 15 hists.
>
> 'test -e tftp filename.ext` does not work either.
>
> Does anyone have a solution for this?
Are you using hush? If so, does this patch help?
http://patchwork.ozlabs.org/patch/354340/
You could add some debugging but I would hope that do_tftpb() would
return 1 in the error case.
Regards,
Simon
More information about the U-Boot
mailing list