<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/common/cli_readline.c, branch v2024.07-rc1</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/common/cli_readline.c?h=v2024.07-rc1</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/common/cli_readline.c?h=v2024.07-rc1'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2024-03-13T16:40:43Z</updated>
<entry>
<title>cli: allow users to determine history buffer allocation method</title>
<updated>2024-03-13T16:40:43Z</updated>
<author>
<name>Hanyuan Zhao</name>
<email>hanyuan-z@qq.com</email>
</author>
<published>2024-03-05T07:37:35Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=421359ac52bfc80946929c4ffeacf6a68273e758'/>
<id>urn:sha1:421359ac52bfc80946929c4ffeacf6a68273e758</id>
<content type='text'>
This commit allows users to choose the appropriate memory
allocation method between static allocated and dynamically
calloc. The previous static-array way will not obviously
contribute to the final binary size since it is uninitialized,
and might have better performance than the dynamical one.
Now we provide the users with both the two options.

Signed-off-by: Hanyuan Zhao &lt;hanyuan-z@qq.com&gt;
</content>
</entry>
<entry>
<title>cli: panic when failed to allocate memory for the history buffer</title>
<updated>2024-03-13T16:40:43Z</updated>
<author>
<name>Hanyuan Zhao</name>
<email>hanyuan-z@qq.com</email>
</author>
<published>2024-03-05T07:37:33Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=44951340309d0dca73c05fc61406a1e839d1da93'/>
<id>urn:sha1:44951340309d0dca73c05fc61406a1e839d1da93</id>
<content type='text'>
This commit simply modifies the history initialize function,
replacing the return value by panic with reasons. The calling
chains of hist_init don't have steps explicitly throwing or
dealing with the ENOMEM error, and once the init fails, the
whole system is died. Using panic here to provide error
information instead.

Signed-off-by: Hanyuan Zhao &lt;hanyuan-z@qq.com&gt;
</content>
</entry>
<entry>
<title>getchar(): Correct usage</title>
<updated>2024-01-19T01:24:13Z</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2024-01-09T22:57:16Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=21a2c129adaab04a7a032a31c816ae09375fe954'/>
<id>urn:sha1:21a2c129adaab04a7a032a31c816ae09375fe954</id>
<content type='text'>
The function getchar() returns an 'int' and not a 'char'. Coverity notes
that "Assigning the return value of getchar to char ... truncates its value."
and so for the most part we can resolve this easily by using 'int' as
intended, and often used throughout the codebase. A few places are not
so simple and would require further re-architecting of the code in order
to change this, so we leave them be.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
</entry>
<entry>
<title>command: Allocate history buffer using calloc()</title>
<updated>2023-12-20T15:46:54Z</updated>
<author>
<name>Marek Vasut</name>
<email>marek.vasut+renesas@mailbox.org</email>
</author>
<published>2023-12-02T20:52:30Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=400cb2a850546e8cc9246cf97f0902ffe57867ab'/>
<id>urn:sha1:400cb2a850546e8cc9246cf97f0902ffe57867ab</id>
<content type='text'>
The history buffer is currently a static array which can be some
10-40 kiB depending on configuration, and so adds considerably to
the U-Boot binary size. Allocate it dynamically instead to reduce
the U-Boot binary size.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
</content>
</entry>
<entry>
<title>cli: Add a function to set up a new cread</title>
<updated>2023-10-11T19:43:54Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2023-10-02T01:13:17Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=39ee32166f607d4e30a74d46f82adb39e4134ec4'/>
<id>urn:sha1:39ee32166f607d4e30a74d46f82adb39e4134ec4</id>
<content type='text'>
Create a init function so that it is easy to use command-line reading.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>cli: Allow command completion to be disabled</title>
<updated>2023-10-11T19:43:54Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2023-10-02T01:13:16Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3b487bf51115bfb9a0f85667a5608fc57788107c'/>
<id>urn:sha1:3b487bf51115bfb9a0f85667a5608fc57788107c</id>
<content type='text'>
When inputting text outside the command line we don't want to use tab
for command completion. Add an option to control this.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>cli: Allow history to be disabled</title>
<updated>2023-10-11T19:43:54Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2023-10-02T01:13:15Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8fc041fe4c34bb6108444ee9970151f43add0ce9'/>
<id>urn:sha1:8fc041fe4c34bb6108444ee9970151f43add0ce9</id>
<content type='text'>
When inputting text outside the command line we don't want history to be
accessible. Add an option to control this.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>cli: Terminate the string in cread_line_process_ch()</title>
<updated>2023-10-11T19:43:54Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2023-10-02T01:13:14Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=657e14da835298a948eb313feffba6732fe9232e'/>
<id>urn:sha1:657e14da835298a948eb313feffba6732fe9232e</id>
<content type='text'>
Rather than relying on the caller, terminate the string inside this
function. Do this each time we return, whether input is finished or
not. It is not needed when the input is aborted, since the string will
be discarded in that case.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>cli: Create a function to process characters</title>
<updated>2023-10-11T19:43:54Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2023-10-02T01:13:13Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e5509ce87b29f773b045200735bec2903b72eed4'/>
<id>urn:sha1:e5509ce87b29f773b045200735bec2903b72eed4</id>
<content type='text'>
Move most of the inner loop from cread_line() into a new function. This
will allow using it from other code.

This involves adding a few more members to the state struct.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>cli: Unindent some code in cread_line()</title>
<updated>2023-10-11T19:43:54Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2023-10-02T01:13:12Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8d997aab6e231aa3b442ffe504b24709ff9c7c19'/>
<id>urn:sha1:8d997aab6e231aa3b442ffe504b24709ff9c7c19</id>
<content type='text'>
Reduce the indentation level of this code so it is easier to review the
next patch, which moves it into a function.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
</feed>
