From: Wolfgang Denk Date: Fri, 13 Mar 2009 14:49:55 +0100 Subject: [U-Boot] exit(-1) function in U-Boot In-Reply-To: <5ec3d7930903130339t592e64a8o5ace302e06976ea@mail.gmail.com> References: <5ec3d7930903130339t592e64a8o5ace302e06976ea@mail.gmail.com> Message-ID: <20090313134955.E5483832E8B8@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Drasko, In message <5ec3d7930903130339t592e64a8o5ace302e06976ea@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 "application", so I guess you are referring to stand- alone applications; these terminate when you return from the top level function. How you arrange for that is up to you. setjmp / long- jmp are usually trivial to implement / use. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de No one can guarantee the actions of another. -- Spock, "Day of the Dove", stardate unknown