[PATCH 2/3] doc: askenv: Reword and remove return value

Tom Rini trini at konsulko.com
Tue Oct 21 22:25:33 CEST 2025


With the addition of general text about how the return value is handled,
remove the examples from the askenv documentation as they are all normal
expected results.

Signed-off-by: Tom Rini <trini at konsulko.com>
---
Cc: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
 doc/usage/cmd/askenv.rst | 27 +++------------------------
 1 file changed, 3 insertions(+), 24 deletions(-)

diff --git a/doc/usage/cmd/askenv.rst b/doc/usage/cmd/askenv.rst
index e2b3c5379aea..a8867ce4d266 100644
--- a/doc/usage/cmd/askenv.rst
+++ b/doc/usage/cmd/askenv.rst
@@ -42,9 +42,8 @@ Value of a environment variable env1 without message and size parameters:
 
 ::
 
-    => askenv env1;echo $?
+    => askenv env1
     Please enter 'env1': val1
-    0
     => printenv env1
     env1=val1
 
@@ -52,9 +51,8 @@ Value of a environment variable env2 with message and size parameters:
 
 ::
 
-    => askenv env2 Please type-in a value for env2: 10;echo $?
+    => askenv env2 Please type-in a value for env2: 10
     Please type-in a value for env2: 1234567890123
-    0
     => printenv env2
     env2=1234567890
 
@@ -62,31 +60,12 @@ Value of a environment variable env3 with size parameter only:
 
 ::
 
-    => askenv env3 10;echo $?
+    => askenv env3 10
     Please enter 'env3': val3
-    0
     => printenv env3
     env3=val3
 
-Return Value of askenv command, when used without any other arguments:
-
-::
-
-    => askenv;echo $?
-    askenv - get environment variables from stdin
-
-    Usage:
-    askenv name [message] [size]
-        - display 'message' and get environment variable 'name' from stdin (max 'size' chars)
-    1
-
 Configuration
 -------------
 
 The askenv command is only available if CMD_ASKENV=y
-
-Return value
-------------
-
-The return value $? is set to 0 (true).
-If no other arguments are specified (along with askenv), it is set to 1 (false).
-- 
2.43.0



More information about the U-Boot mailing list