summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2021-01-20 12:14:01 +0100
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2021-01-25 01:15:33 +0100
commit627b57bde05063b2f512d8e3ec6f8060aea25b91 (patch)
treed013d7c59a272aa7281ae1a4ddba512cac13f4b0 /doc
parent9c6d050966be910586aba358a8c63364afe37e03 (diff)
downloadu-boot-627b57bde05063b2f512d8e3ec6f8060aea25b91.tar.gz
u-boot-627b57bde05063b2f512d8e3ec6f8060aea25b91.tar.xz
u-boot-627b57bde05063b2f512d8e3ec6f8060aea25b91.zip
doc: describe exit command
Man-page for exit shell command. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'doc')
-rw-r--r--doc/usage/exit.rst40
-rw-r--r--doc/usage/index.rst1
2 files changed, 41 insertions, 0 deletions
diff --git a/doc/usage/exit.rst b/doc/usage/exit.rst
new file mode 100644
index 0000000000..769223c477
--- /dev/null
+++ b/doc/usage/exit.rst
@@ -0,0 +1,40 @@
+exit command
+============
+
+Synopsis
+--------
+
+::
+
+ exit
+
+Description
+-----------
+
+The exit command terminates a script started via the run or source command.
+If scripts are nested, only the innermost script is left.
+
+::
+
+ => setenv inner 'echo entry inner; exit; echo inner done'
+ => setenv outer 'echo entry outer; run inner; echo outer done'
+ => run outer
+ entry outer
+ entry inner
+ outer done
+ =>
+
+When executed outside a script a warning is written. Following commands are not
+executed.
+
+::
+
+ => echo first; exit; echo last
+ first
+ exit not allowed from main input shell.
+ =>
+
+Return value
+------------
+
+$? is always set to 0 (true).
diff --git a/doc/usage/index.rst b/doc/usage/index.rst
index eedcdb110b..b8f216b713 100644
--- a/doc/usage/index.rst
+++ b/doc/usage/index.rst
@@ -17,6 +17,7 @@ Shell commands
bootefi
bootmenu
button
+ exit
mbr
pstore
sbi