[U-Boot] tftp command return value

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?
Best, l3iggs

Hi,
On 1 June 2014 22:32, l3iggs . l3iggs@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
participants (2)
-
l3iggs .
-
Simon Glass