Re: [U-Boot] exit(-1) function in U-Boot

2009-03-17 Thread Drasko DRASKOVIC
On Tue, Mar 17, 2009 at 11:18 AM, Drasko DRASKOVIC drasko.drasko...@gmail.com wrote: Actually, I ment U-boot itself. When I said application, I was wrong. I ment for example command, which is part of U-Boot. If I want to exit when something is wrong within TFTP for example, I cannnot break

Re: [U-Boot] exit(-1) function in U-Boot

2009-03-17 Thread Drasko DRASKOVIC
Hi Wolfgang, When something is wrong within TFTP, the respective function returns an error code, which propagates upward and causes the running command to terminate, so you automatically end up back in the U-Boot shell. Yes, I agree but the caller might do something else before exits

Re: [U-Boot] exit(-1) function in U-Boot

2009-03-17 Thread Wolfgang Denk
Dear Drasko DRASKOVIC, In message 5ec3d7930903170549sf6337c9l292d9ebef0fdf...@mail.gmail.com you wrote: Quite simple, so I can see where it breaks. Some kind of assert. (Is there an assert in U-Boot?) Instead of vague descriptions like something is wrong within TFTP or it breaks you

Re: [U-Boot] exit(-1) function in U-Boot

2009-03-17 Thread Drasko DRASKOVIC
Hi Wolfgang, Instead of vague descriptions like something is wrong within TFTP or it breaks you could try and post the exact commands you're trying and the exact error messages you are seing, I am sorry for being vague, I hope this example will make it a bit more clear: static void

Re: [U-Boot] exit(-1) function in U-Boot

2009-03-17 Thread Wolfgang Denk
Dear Drasko DRASKOVIC, In message 5ec3d7930903170638n7769e61anb30f5ce39d704...@mail.gmail.com you wrote: I am sorry for being vague, I hope this example will make it a bit more clear: static void TftpTimeout (void) { if (++TftpTimeoutCount TIMEOUT_COUNT) { puts (\nRetry

[U-Boot] exit(-1) function in U-Boot

2009-03-13 Thread Drasko DRASKOVIC
Hi all, I am having hard time to find exit() function in U-Boot, so I can exit from a application at any function when something goes wrong. Is there some alternative? I just want to break program execution, printf message on the screen and regain the prompt. Salut, Drasko

Re: [U-Boot] exit(-1) function in U-Boot

2009-03-13 Thread Wolfgang Denk
Dear Drasko, In message 5ec3d7930903130339t592e64a8o5ace302e0697...@mail.gmail.com you wrote: I am having hard time to find exit() function in U-Boot, so I can exit from a application at any function when something goes wrong. U-Boot itself has no exit, obviously. But you mention