<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/common/cli.c, branch v2024.07-rc2</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>cli: always show cursor</title>
<updated>2024-04-12T14:53:31+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2024-03-29T16:09:22+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d2e4b2fa04cfeb71b821f9d0100d886b7f9e166c'/>
<id>d2e4b2fa04cfeb71b821f9d0100d886b7f9e166c</id>
<content type='text'>
We may enter the command line interface in a state where on the remote
console the cursor is not shown. Send an escape sequence to enable it.

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We may enter the command line interface in a state where on the remote
console the cursor is not shown. Send an escape sequence to enable it.

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: add modern hush as parser for run_command*()</title>
<updated>2023-12-28T17:02:56+00:00</updated>
<author>
<name>Francis Laniel</name>
<email>francis.laniel@amarulasolutions.com</email>
</author>
<published>2023-12-22T21:02:35+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3ea3c57ef5c5853f54714a3df8b0d406e8d4dd1c'/>
<id>3ea3c57ef5c5853f54714a3df8b0d406e8d4dd1c</id>
<content type='text'>
Enables using, in code, modern hush as parser for run_command function family.
It also enables the command run to be used by CLI user of modern hush.

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Francis Laniel &lt;francis.laniel@amarulasolutions.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Enables using, in code, modern hush as parser for run_command function family.
It also enables the command run to be used by CLI user of modern hush.

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Francis Laniel &lt;francis.laniel@amarulasolutions.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: Enables using modern hush parser as command line parser</title>
<updated>2023-12-28T17:02:56+00:00</updated>
<author>
<name>Francis Laniel</name>
<email>francis.laniel@amarulasolutions.com</email>
</author>
<published>2023-12-22T21:02:32+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=9a068377313c1feabb55072d2d1157999cf9d15e'/>
<id>9a068377313c1feabb55072d2d1157999cf9d15e</id>
<content type='text'>
If one defines HUSH_MODERN_PARSER, it is then possible to use modern parser with:
=&gt; cli get
old
=&gt; cli set modern
=&gt; cli get
modern

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Francis Laniel &lt;francis.laniel@amarulasolutions.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If one defines HUSH_MODERN_PARSER, it is then possible to use modern parser with:
=&gt; cli get
old
=&gt; cli set modern
=&gt; cli get
modern

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Francis Laniel &lt;francis.laniel@amarulasolutions.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd: Add new cli command</title>
<updated>2023-12-28T17:02:56+00:00</updated>
<author>
<name>Francis Laniel</name>
<email>francis.laniel@amarulasolutions.com</email>
</author>
<published>2023-12-22T21:02:31+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6bb39f5d16e8531eeca8237454cc528aa54c9e81'/>
<id>6bb39f5d16e8531eeca8237454cc528aa54c9e81</id>
<content type='text'>
This command can be used to print the current parser with 'cli get'.
It can also be used to set the current parser with 'cli set'.
For the moment, only one value is valid for set: old.

Signed-off-by: Francis Laniel &lt;francis.laniel@amarulasolutions.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This command can be used to print the current parser with 'cli get'.
It can also be used to set the current parser with 'cli set'.
For the moment, only one value is valid for set: old.

Signed-off-by: Francis Laniel &lt;francis.laniel@amarulasolutions.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>global_data.h: add GD_FLG_HUSH_OLD_PARSER flag</title>
<updated>2023-12-28T17:02:56+00:00</updated>
<author>
<name>Francis Laniel</name>
<email>francis.laniel@amarulasolutions.com</email>
</author>
<published>2023-12-22T21:02:30+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=603a814a3358eccdb8955bc228f9180173575083'/>
<id>603a814a3358eccdb8955bc228f9180173575083</id>
<content type='text'>
This flag is used to indicate we are using the hush parser.

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Francis Laniel &lt;francis.laniel@amarulasolutions.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This flag is used to indicate we are using the hush parser.

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Francis Laniel &lt;francis.laniel@amarulasolutions.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: run_commandf(): small fixups</title>
<updated>2023-03-30T19:09:59+00:00</updated>
<author>
<name>Evgeny Bachinin</name>
<email>EABachinin@sberdevices.ru</email>
</author>
<published>2023-03-20T08:23:11+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=26f923c7cff1a46d465efcd3b8f2240523c7ab08'/>
<id>26f923c7cff1a46d465efcd3b8f2240523c7ab08</id>
<content type='text'>
* vsnprintf() can truncate cmd, hence it makes no sense to launch such
command (it's broken). Moreover, it's better to signalize to the caller
about such case (for facilitating debugging or bug hunting).

* Fix kernel-doc warnings:
  include/command.h:264: info: Scanning doc for run_commandf
  include/command.h:268: warning: contents before sections
  include/command.h:271: warning: No description found for return value
                                  of 'run_commandf'

* Add printf-like format attribute to validate at compile-time the format
string against parameters's type.

* Fix compilation error in case of -Wall, -Werror, -Wextra:
error: variable ‘i’ set but not used [-Werror=unused-but-set-variable]

* Drop extra ret variable.

Signed-off-by: Evgeny Bachinin &lt;EABachinin@sberdevices.ru&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* vsnprintf() can truncate cmd, hence it makes no sense to launch such
command (it's broken). Moreover, it's better to signalize to the caller
about such case (for facilitating debugging or bug hunting).

* Fix kernel-doc warnings:
  include/command.h:264: info: Scanning doc for run_commandf
  include/command.h:268: warning: contents before sections
  include/command.h:271: warning: No description found for return value
                                  of 'run_commandf'

* Add printf-like format attribute to validate at compile-time the format
string against parameters's type.

* Fix compilation error in case of -Wall, -Werror, -Wextra:
error: variable ‘i’ set but not used [-Werror=unused-but-set-variable]

* Drop extra ret variable.

Signed-off-by: Evgeny Bachinin &lt;EABachinin@sberdevices.ru&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Correct SPL use of HUSH_PARSER</title>
<updated>2023-02-10T12:41:39+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2023-02-05T22:40:06+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b84d23d0cdb6367888ef9edd3c427ad1f7e9f7bc'/>
<id>b84d23d0cdb6367888ef9edd3c427ad1f7e9f7bc</id>
<content type='text'>
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_HUSH_PARSER defined in Kconfig

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_HUSH_PARSER defined in Kconfig

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd: exit: Fix return value propagation out of environment scripts</title>
<updated>2023-01-11T20:02:24+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marex@denx.de</email>
</author>
<published>2022-12-20T06:25:59+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=721307eba0e7d94241698936c58352ee3c6da748'/>
<id>721307eba0e7d94241698936c58352ee3c6da748</id>
<content type='text'>
Make sure the 'exit' command as well as 'exit $val' command exits
from environment scripts immediately and propagates return value
out of those scripts fully. That means the following behavior is
expected:

"
=&gt; setenv foo 'echo bar ; exit 1' ; run foo ; echo $?
bar
1
=&gt; setenv foo 'echo bar ; exit 0' ; run foo ; echo $?
bar
0
=&gt; setenv foo 'echo bar ; exit -2' ; run foo ; echo $?
bar
0
"

As well as the followin behavior:

"
=&gt; setenv foo 'echo bar ; exit 3 ; echo fail'; run foo; echo $?
bar
3
=&gt; setenv foo 'echo bar ; exit 1 ; echo fail'; run foo; echo $?
bar
1
=&gt; setenv foo 'echo bar ; exit 0 ; echo fail'; run foo; echo $?
bar
0
=&gt; setenv foo 'echo bar ; exit -1 ; echo fail'; run foo; echo $?
bar
0
=&gt; setenv foo 'echo bar ; exit -2 ; echo fail'; run foo; echo $?
bar
0
=&gt; setenv foo 'echo bar ; exit ; echo fail'; run foo; echo $?
bar
0
"

Fixes: 8c4e3b79bd0 ("cmd: exit: Fix return value")
Reviewed-by: Hector Palacios &lt;hector.palacios@digi.com&gt;
Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make sure the 'exit' command as well as 'exit $val' command exits
from environment scripts immediately and propagates return value
out of those scripts fully. That means the following behavior is
expected:

"
=&gt; setenv foo 'echo bar ; exit 1' ; run foo ; echo $?
bar
1
=&gt; setenv foo 'echo bar ; exit 0' ; run foo ; echo $?
bar
0
=&gt; setenv foo 'echo bar ; exit -2' ; run foo ; echo $?
bar
0
"

As well as the followin behavior:

"
=&gt; setenv foo 'echo bar ; exit 3 ; echo fail'; run foo; echo $?
bar
3
=&gt; setenv foo 'echo bar ; exit 1 ; echo fail'; run foo; echo $?
bar
1
=&gt; setenv foo 'echo bar ; exit 0 ; echo fail'; run foo; echo $?
bar
0
=&gt; setenv foo 'echo bar ; exit -1 ; echo fail'; run foo; echo $?
bar
0
=&gt; setenv foo 'echo bar ; exit -2 ; echo fail'; run foo; echo $?
bar
0
=&gt; setenv foo 'echo bar ; exit ; echo fail'; run foo; echo $?
bar
0
"

Fixes: 8c4e3b79bd0 ("cmd: exit: Fix return value")
Reviewed-by: Hector Palacios &lt;hector.palacios@digi.com&gt;
Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fdt: Start a test for the fdt command</title>
<updated>2022-07-26T08:30:56+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2022-07-13T12:06:59+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=747244840b647991844556284aacdb3857440861'/>
<id>747244840b647991844556284aacdb3857440861</id>
<content type='text'>
Add a basic test of the 'fdt addr' command, to kick things off.

This includes a new convenience function to run a command from a printf()
string.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a basic test of the 'fdt addr' command, to kick things off.

This includes a new convenience function to run a command from a printf()
string.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>doc: replace @return by Return:</title>
<updated>2022-01-19T17:11:34+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2022-01-19T17:05:50+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=185f812c419f1b4f0d10d9787d59cf9f11a2a600'/>
<id>185f812c419f1b4f0d10d9787d59cf9f11a2a600</id>
<content type='text'>
Sphinx expects Return: and not @return to indicate a return value.

find . -name '*.c' -exec \
sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \;

find . -name '*.h' -exec \
sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \;

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sphinx expects Return: and not @return to indicate a return value.

find . -name '*.c' -exec \
sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \;

find . -name '*.h' -exec \
sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \;

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