summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorAndrew Gabbasov <andrew_gabbasov@mentor.com>2013-12-27 10:05:14 -0600
committerTom Rini <trini@ti.com>2014-01-14 09:01:05 -0500
commit9b438946c995c80afb47c4cef6b03ae845098698 (patch)
tree29e74f625507c3330d83d0205924b5eb2a78a11b /common
parent4d3b8a0d1b8665c190d502744e753ba05a047810 (diff)
downloadu-boot-9b438946c995c80afb47c4cef6b03ae845098698.tar.gz
u-boot-9b438946c995c80afb47c4cef6b03ae845098698.tar.bz2
u-boot-9b438946c995c80afb47c4cef6b03ae845098698.zip
command.c: Fix auto-completion for the full commands list case
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>
Diffstat (limited to 'common')
-rw-r--r--common/command.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/command.c b/common/command.c
index 625571dd4d..597ab4cb4d 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;