public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] command.c: Fix auto-completion for the full commands list case
@ 2013-12-27 16:05 Andrew Gabbasov
  2014-01-14 21:02 ` [U-Boot] " Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Gabbasov @ 2013-12-27 16:05 UTC (permalink / raw)
  To: u-boot

Compiling of full list of commands does not advance the counter,
so it always results in an empty list.
This seems to be (inadvertently?) introduced by commit
6c7c946cadfafdea80eb930e3181085b907a0362.

Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
---
 common/command.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/command.c b/common/command.c
index 625571d..597ab4c 100644
--- a/common/command.c
+++ b/common/command.c
@@ -184,10 +184,10 @@ static int complete_cmdv(int argc, char * const argv[], char last_char, int maxv
 		/* output full list of commands */
 		for (; cmdtp != cmdend; cmdtp++) {
 			if (n_found >= maxv - 2) {
-				cmdv[n_found] = "...";
+				cmdv[n_found++] = "...";
 				break;
 			}
-			cmdv[n_found] = cmdtp->name;
+			cmdv[n_found++] = cmdtp->name;
 		}
 		cmdv[n_found] = NULL;
 		return n_found;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] command.c: Fix auto-completion for the full commands list case
  2013-12-27 16:05 [U-Boot] [PATCH] command.c: Fix auto-completion for the full commands list case Andrew Gabbasov
@ 2014-01-14 21:02 ` Tom Rini
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2014-01-14 21:02 UTC (permalink / raw)
  To: u-boot

On Fri, Dec 27, 2013 at 10:05:14AM -0600, Andrew Gabbasov wrote:

> Compiling of full list of commands does not advance the counter,
> so it always results in an empty list.
> This seems to be (inadvertently?) introduced by commit
> 6c7c946cadfafdea80eb930e3181085b907a0362.
> 
> Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140114/fc5e97fa/attachment.pgp>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-01-14 21:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-27 16:05 [U-Boot] [PATCH] command.c: Fix auto-completion for the full commands list case Andrew Gabbasov
2014-01-14 21:02 ` [U-Boot] " Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox