<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/doc/usage/cmd/setexpr.rst, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>doc: usage: Add general rule for `$?`</title>
<updated>2025-10-26T15:03:35+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2025-10-24T16:02:57+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=11da3403e91c9f510495c75d07750b6ac3c3b2e7'/>
<id>11da3403e91c9f510495c75d07750b6ac3c3b2e7</id>
<content type='text'>
For nearly all commands in U-Boot the '?' variable is handled the same
way with 0 meaning success, 1 meaning any failure.  Explain this in the
general rules section of the cmdline documentation (with a link to a
counter example) and then remove the redundant wording from most
commands. We retain a section about the return value in a number of
places where we are doing something such as always returning a specific
value or we have useful additional information to go along with the
normal return codes.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For nearly all commands in U-Boot the '?' variable is handled the same
way with 0 meaning success, 1 meaning any failure.  Explain this in the
general rules section of the cmdline documentation (with a link to a
counter example) and then remove the redundant wording from most
commands. We retain a section about the return value in a number of
places where we are doing something such as always returning a specific
value or we have useful additional information to go along with the
normal return codes.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>doc: document test command</title>
<updated>2025-05-29T14:25:18+00:00</updated>
<author>
<name>Rasmus Villemoes</name>
<email>ravi@prevas.dk</email>
</author>
<published>2025-05-13T08:40:34+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6990cc5257283a631a286a4321a3515c7537f636'/>
<id>6990cc5257283a631a286a4321a3515c7537f636</id>
<content type='text'>
Add documentation for the test command, including the newly added =~
operator and some gotchas wrt. the numeric comparisons.

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Rasmus Villemoes &lt;ravi@prevas.dk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add documentation for the test command, including the newly added =~
operator and some gotchas wrt. the numeric comparisons.

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Rasmus Villemoes &lt;ravi@prevas.dk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd: setexpr: fix no matching string in gsub return empty value</title>
<updated>2024-03-02T17:26:19+00:00</updated>
<author>
<name>Massimiliano Minella</name>
<email>massimiliano.minella@se.com</email>
</author>
<published>2024-02-08T14:58:27+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4c7363068651f222be6150050bb3aa9823ca6f78'/>
<id>4c7363068651f222be6150050bb3aa9823ca6f78</id>
<content type='text'>
In gsub, when the destination string is empty, the string 't' is
provided and the regular expression doesn't match, then the final result
is an empty string.

Example:

=&gt; echo ${foo}

=&gt; setenv foo
=&gt; setexpr foo gsub e a bar
=&gt; echo ${foo}

=&gt;

The variable ${foo} should contain "bar" and the lack of match shouldn't
be considered an error.

This patch fixes the erroneous behavior by removing the return
statement and breaking out of the loop in case of lack of match.

Also add a test for the no match case.

Signed-off-by: Massimiliano Minella &lt;massimiliano.minella@se.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In gsub, when the destination string is empty, the string 't' is
provided and the regular expression doesn't match, then the final result
is an empty string.

Example:

=&gt; echo ${foo}

=&gt; setenv foo
=&gt; setexpr foo gsub e a bar
=&gt; echo ${foo}

=&gt;

The variable ${foo} should contain "bar" and the lack of match shouldn't
be considered an error.

This patch fixes the erroneous behavior by removing the return
statement and breaking out of the loop in case of lack of match.

Also add a test for the no match case.

Signed-off-by: Massimiliano Minella &lt;massimiliano.minella@se.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>doc: create index entries for commands</title>
<updated>2024-01-17T07:40:19+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2024-01-14T13:53:13+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=60971e63e60b36203a5e3cb30deaa05dbd276f82'/>
<id>60971e63e60b36203a5e3cb30deaa05dbd276f82</id>
<content type='text'>
Add the description of CLI commands to the generated index.

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add the description of CLI commands to the generated index.

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>doc: complete setexpr configuration information</title>
<updated>2023-02-10T12:05:39+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2023-01-27T21:00:30+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=67835c20901c4286dae0553704fe43039d441dfe'/>
<id>67835c20901c4286dae0553704fe43039d441dfe</id>
<content type='text'>
Add missing information to the configuration section of the setexpr
man-page.

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add missing information to the configuration section of the setexpr
man-page.

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>doc: usage: Group all shell command docs into cmd/ sub-directory</title>
<updated>2022-03-31T17:06:16+00:00</updated>
<author>
<name>Bin Meng</name>
<email>bmeng.cn@gmail.com</email>
</author>
<published>2022-03-28T03:02:56+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=34e452dd0252c162242a718ed5287a2af622b7d7'/>
<id>34e452dd0252c162242a718ed5287a2af622b7d7</id>
<content type='text'>
Currently all shell command docs are put in the doc/usage root.
Let's group them into cmd/ sub-directory.

Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Reviewed-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently all shell command docs are put in the doc/usage root.
Let's group them into cmd/ sub-directory.

Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Reviewed-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
