X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=common%2Fhush.c;h=528dd254a5064cf6c45c00f9b8689858222de306;hb=9ae7ae6b4dd9d0c6489ac5b054846f80cfd973b8;hp=9aef6e41dbfdbec4a6b3be491db09cd3744c6068;hpb=f82642e33899766892499b163e60560fbbf87773;p=u-boot diff --git a/common/hush.c b/common/hush.c index 9aef6e41db..528dd254a5 100644 --- a/common/hush.c +++ b/common/hush.c @@ -96,7 +96,6 @@ /*cmd_boot.c*/ extern int do_bootd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); /* do_bootd */ #endif -#ifdef CONFIG_SYS_HUSH_PARSER #ifndef __U_BOOT__ #include /* isalpha, isdigit */ #include /* getpid */ @@ -1696,7 +1695,7 @@ static int run_pipe_real(struct pipe *pi) #endif /* found - check max args */ if ((child->argc - i) > cmdtp->maxargs) { - printf ("Usage:\n%s\n", cmdtp->usage); + cmd_usage(cmdtp); return -1; } #endif @@ -2003,7 +2002,7 @@ static int free_pipe(struct pipe *pi, int indent) #ifndef __U_BOOT__ globfree(&child->glob_result); #else - for (a = child->argc;a >= 0;a--) { + for (a = 0; a < child->argc; a++) { free(child->argv[a]); } free(child->argv); @@ -3625,12 +3624,11 @@ int do_showvar (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) U_BOOT_CMD( showvar, CONFIG_SYS_MAXARGS, 1, do_showvar, - "showvar- print local hushshell variables\n", + "print local hushshell variables", "\n - print values of all hushshell variables\n" "showvar name ...\n" - " - print value of hushshell variable 'name'\n" + " - print value of hushshell variable 'name'" ); #endif -#endif /* CONFIG_SYS_HUSH_PARSER */ /****************************************************************************/