aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSamuel Dionne-Riel2022-08-18 15:44:04 -0400
committerTom Rini2022-09-02 13:40:42 -0400
commitdc0d17c26a3a03634994c59adb0b657807827183 (patch)
tree991b387d3fcb0fd43082033fc0fc040ea756ef4d /doc
parentd88260710b212815ae1f461aec24ad926c668d36 (diff)
cmd: Add pause command
This command is being introduced with the goal of allowing user-friendly "generic use case" U-Boot builds to pause until user input under some situations. The main use case would be when a boot failure happens, to pause until the user has had time to acknowledge the current state. Tested using: make && ./u-boot -v -T -c 'ut lib lib_test_hush_pause' Signed-off-by: Samuel Dionne-Riel <samuel@dionne-riel.com> Cc: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'doc')
-rw-r--r--doc/usage/cmd/pause.rst53
-rw-r--r--doc/usage/index.rst1
2 files changed, 54 insertions, 0 deletions
diff --git a/doc/usage/cmd/pause.rst b/doc/usage/cmd/pause.rst
new file mode 100644
index 00000000000..c79e399c020
--- /dev/null
+++ b/doc/usage/cmd/pause.rst
@@ -0,0 +1,53 @@
+.. SPDX-License-Identifier: GPL-2.0-or-later:
+
+pause command
+=============
+
+Synopsis
+--------
+
+::
+
+ pause [prompt]
+
+
+Description
+-----------
+
+The pause command delays execution waiting for any user input.
+
+It can accept a single parameter to change the prompt message.
+
+Examples
+--------
+
+Using with the default prompt:
+
+::
+
+ => pause
+ Press any key to continue...
+
+
+Using with a custom prompt:
+
+::
+
+ => pause 'Prompt for pause...'
+ Prompt for pause...
+
+Note that complex prompts require proper quoting:
+
+::
+
+ => pause Prompt for pause...
+ pause - delay until user input
+
+ Usage:
+ pause [prompt] - Wait until users presses any key. [prompt] can be used to customize the message.
+
+Return value
+------------
+
+The return value $? is always set to 0 (true), unless invoked in an invalid
+manner.
diff --git a/doc/usage/index.rst b/doc/usage/index.rst
index 28f9683a3e6..5170fa8b4a5 100644
--- a/doc/usage/index.rst
+++ b/doc/usage/index.rst
@@ -52,6 +52,7 @@ Shell commands
cmd/mbr
cmd/md
cmd/mmc
+ cmd/pause
cmd/pinmux
cmd/printenv
cmd/pstore