<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/common/cli_hush.c, branch v2016.07</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>hush: Add rudimentary support for PS1 and PS2</title>
<updated>2016-02-08T15:10:37+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marex@denx.de</email>
</author>
<published>2016-01-27T03:47:55+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f3b267b3a229e328bf765ffbb8cb2af382bbfa63'/>
<id>f3b267b3a229e328bf765ffbb8cb2af382bbfa63</id>
<content type='text'>
Add trivial support for changing the U-Boot command prompt string
by setting PS1 and PS2 environment variables. Only static variables
are supported.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Reviewed-by: Heiko Schocher &lt;hs@denx.de&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add trivial support for changing the U-Boot command prompt string
by setting PS1 and PS2 environment variables. Only static variables
are supported.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Reviewed-by: Heiko Schocher &lt;hs@denx.de&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hush: Pull out U-Boot prompt display and read functionality</title>
<updated>2016-02-08T15:10:36+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marex@denx.de</email>
</author>
<published>2016-01-27T03:47:54+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=13d3046fa392625f172d55cba8eb551f47e45f3f'/>
<id>13d3046fa392625f172d55cba8eb551f47e45f3f</id>
<content type='text'>
Pull the code which displays U-Boot prompt and reads the command line
into a separate function. No functional change.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Reviewed-by: Heiko Schocher &lt;hs@denx.de&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull the code which displays U-Boot prompt and reads the command line
into a separate function. No functional change.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Reviewed-by: Heiko Schocher &lt;hs@denx.de&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>common: cli_hush: Fix up simple typo</title>
<updated>2015-12-12T20:56:10+00:00</updated>
<author>
<name>Nishanth Menon</name>
<email>nm@ti.com</email>
</author>
<published>2015-12-04T19:02:11+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8405b8d98a96233cc73969817367630ae7cc46b1'/>
<id>8405b8d98a96233cc73969817367630ae7cc46b1</id>
<content type='text'>
Correct the spelling for character..

Signed-off-by: Nishanth Menon &lt;nm@ti.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Correct the spelling for character..

Signed-off-by: Nishanth Menon &lt;nm@ti.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>common: cli_hush: avoid memory leak</title>
<updated>2015-12-05T23:22:28+00:00</updated>
<author>
<name>Peng Fan</name>
<email>Peng.Fan@freescale.com</email>
</author>
<published>2015-11-27T02:12:02+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c6bb23c819b5dcbc5c3491673f5e408c0b9c38b3'/>
<id>c6bb23c819b5dcbc5c3491673f5e408c0b9c38b3</id>
<content type='text'>
Need to free memory avoid memory leak, when error.

Signed-off-by: Peng Fan &lt;Peng.Fan@freescale.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Need to free memory avoid memory leak, when error.

Signed-off-by: Peng Fan &lt;Peng.Fan@freescale.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>common: cli_hush: avoid dead code</title>
<updated>2015-12-05T23:22:14+00:00</updated>
<author>
<name>Peng Fan</name>
<email>Peng.Fan@freescale.com</email>
</author>
<published>2015-11-24T08:54:21+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=aa722529635c16c52d9d609122fecc96ec8d03e4'/>
<id>aa722529635c16c52d9d609122fecc96ec8d03e4</id>
<content type='text'>
Condition "(value == NULL &amp;&amp; ++value == NULL)" actully will
always return false.

Instead, use condition "(value == NULL || *(value + 1) == 0)" to detect
such expression "c=". To "c=", *(value + 1) is 0, so directly return -1,
but not continue.

Signed-off-by: Peng Fan &lt;Peng.Fan@freescale.com&gt;
Cc: Rabin Vincent &lt;rabin@rab.in&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Condition "(value == NULL &amp;&amp; ++value == NULL)" actully will
always return false.

Instead, use condition "(value == NULL || *(value + 1) == 0)" to detect
such expression "c=". To "c=", *(value + 1) is 0, so directly return -1,
but not continue.

Signed-off-by: Peng Fan &lt;Peng.Fan@freescale.com&gt;
Cc: Rabin Vincent &lt;rabin@rab.in&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Move console definitions into a new console.h file</title>
<updated>2015-11-20T03:27:50+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2015-11-09T06:47:45+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=24b852a7a2b8eca71789100983bdb5104cc00696'/>
<id>24b852a7a2b8eca71789100983bdb5104cc00696</id>
<content type='text'>
The console includes a global variable and several functions that are only
used by a small subset of U-Boot files. Before adding more functions, move
the definitions into their own header file.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The console includes a global variable and several functions that are only
used by a small subset of U-Boot files. Before adding more functions, move
the definitions into their own header file.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "hush: fix segfault on syntax error"</title>
<updated>2014-11-24T17:06:06+00:00</updated>
<author>
<name>Rabin Vincent</name>
<email>rabin@rab.in</email>
</author>
<published>2014-11-21T22:05:22+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f3a05c8f944ab2cd832e69a5705708ee7a1797fa'/>
<id>f3a05c8f944ab2cd832e69a5705708ee7a1797fa</id>
<content type='text'>
128059b92 ("hush: fix segfault on syntax error") attempted to fix a
segfault on syntax errors, but it broke Ctrl-C handling, and the
assumption that it made, that rcode could not be -1, is incorrect.
Revert this change.

Reported-by: Stephen Warren &lt;swarren@wwwdotorg.org&gt;
Reported-by: Przemyslaw Marczak &lt;p.marczak@samsung.com&gt;
Signed-off-by: Rabin Vincent &lt;rabin@rab.in&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
128059b92 ("hush: fix segfault on syntax error") attempted to fix a
segfault on syntax errors, but it broke Ctrl-C handling, and the
assumption that it made, that rcode could not be -1, is incorrect.
Revert this change.

Reported-by: Stephen Warren &lt;swarren@wwwdotorg.org&gt;
Reported-by: Przemyslaw Marczak &lt;p.marczak@samsung.com&gt;
Signed-off-by: Rabin Vincent &lt;rabin@rab.in&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hush: make run_command() return an error on parsing failure</title>
<updated>2014-11-07T21:27:06+00:00</updated>
<author>
<name>Rabin Vincent</name>
<email>rabin@rab.in</email>
</author>
<published>2014-10-29T22:21:41+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2302b3ab85843c9a8dbb3a924030659d87a23349'/>
<id>2302b3ab85843c9a8dbb3a924030659d87a23349</id>
<content type='text'>
run_command() returns success even if the command had a syntax error;
correct this behaviour.

Signed-off-by: Rabin Vincent &lt;rabin@rab.in&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
run_command() returns success even if the command had a syntax error;
correct this behaviour.

Signed-off-by: Rabin Vincent &lt;rabin@rab.in&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org)
</pre>
</div>
</content>
</entry>
<entry>
<title>hush: fix segfault on syntax error</title>
<updated>2014-11-07T21:27:06+00:00</updated>
<author>
<name>Rabin Vincent</name>
<email>rabin@rab.in</email>
</author>
<published>2014-10-29T22:21:40+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=128059b926b3c34bbb364dcacd8d0511ff906be8'/>
<id>128059b926b3c34bbb364dcacd8d0511ff906be8</id>
<content type='text'>
Hush segfaults if it sees a syntax error while attempting to parse a
command:

 $ ./u-boot -c "'"
 ...
 syntax error
 Segmentation fault (core dumped)

This is due to a NULL pointer dereference of in_str-&gt;p in static_peek().
The problem is that the exit condition for the loop in
parse_stream_outer() checks for rcode not being -1, but rcode is only
ever 0 or 1.

Signed-off-by: Rabin Vincent &lt;rabin@rab.in&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org)
Tested-by: Simon Glass &lt;sjg@chromium.org)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Hush segfaults if it sees a syntax error while attempting to parse a
command:

 $ ./u-boot -c "'"
 ...
 syntax error
 Segmentation fault (core dumped)

This is due to a NULL pointer dereference of in_str-&gt;p in static_peek().
The problem is that the exit condition for the loop in
parse_stream_outer() checks for rcode not being -1, but rcode is only
ever 0 or 1.

Signed-off-by: Rabin Vincent &lt;rabin@rab.in&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org)
Tested-by: Simon Glass &lt;sjg@chromium.org)
</pre>
</div>
</content>
</entry>
<entry>
<title>hush: return consistent codes from run_command()</title>
<updated>2014-11-07T21:27:06+00:00</updated>
<author>
<name>Rabin Vincent</name>
<email>rabin@rab.in</email>
</author>
<published>2014-10-29T22:21:39+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=484408fb5194586b6ba6251f15cbae0c445c3bf5'/>
<id>484408fb5194586b6ba6251f15cbae0c445c3bf5</id>
<content type='text'>
Attempting to run:
 - an empty string
 - a string with just spaces

returns different error codes, 1 for the empty string and 0
for the string with just spaces.  Make both of them return
0 for consistency.

Signed-off-by: Rabin Vincent &lt;rabin@rab.in&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Attempting to run:
 - an empty string
 - a string with just spaces

returns different error codes, 1 for the empty string and 0
for the string with just spaces.  Make both of them return
0 for consistency.

Signed-off-by: Rabin Vincent &lt;rabin@rab.in&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org)
</pre>
</div>
</content>
</entry>
</feed>
