/*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 <ctype.h> /* isalpha, isdigit */
#include <unistd.h> /* getpid */
#endif
/* found - check max args */
if ((child->argc - i) > cmdtp->maxargs) {
- printf ("Usage:\n%s\n", cmdtp->usage);
+ cmd_usage(cmdtp);
return -1;
}
#endif
#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);
}
#ifdef __U_BOOT__
+#ifndef CONFIG_RELOC_FIXUP_WORKS
static void u_boot_hush_reloc(void)
{
unsigned long addr;
r->literal = (char *)addr;
}
}
+#endif
int u_boot_hush_start(void)
{
top_vars->next = 0;
top_vars->flg_export = 0;
top_vars->flg_read_only = 1;
+#ifndef CONFIG_RELOC_FIXUP_WORKS
u_boot_hush_reloc();
+#endif
}
return 0;
}
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 */
/****************************************************************************/