]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - common/hush.c
correct a syntax typo in at91_matrix.h
[people/ms/u-boot.git] / common / hush.c
index 01b74d7829e18daa498e30063b1c3d47cb419900..06c5ff8df4c25dfc601f275c1af6265c71614139 100644 (file)
@@ -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 <ctype.h>     /* isalpha, isdigit */
 #include <unistd.h>    /* getpid */
@@ -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);
@@ -3271,6 +3270,7 @@ int parse_file_outer(void)
 }
 
 #ifdef __U_BOOT__
+#ifndef CONFIG_RELOC_FIXUP_WORKS
 static void u_boot_hush_reloc(void)
 {
        unsigned long addr;
@@ -3281,6 +3281,7 @@ static void u_boot_hush_reloc(void)
                r->literal = (char *)addr;
        }
 }
+#endif
 
 int u_boot_hush_start(void)
 {
@@ -3291,7 +3292,9 @@ 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;
 }
@@ -3628,9 +3631,8 @@ U_BOOT_CMD(
        "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 */
 /****************************************************************************/