pci: sata_sil: Drop DM_PCI checks
[platform/kernel/u-boot.git] / common / cli_hush.c
index cf1e273..1467ff8 100644 (file)
@@ -84,9 +84,7 @@
 #include <cli.h>
 #include <cli_hush.h>
 #include <command.h>        /* find_cmd */
-#ifndef CONFIG_SYS_PROMPT_HUSH_PS2
-#define CONFIG_SYS_PROMPT_HUSH_PS2     "> "
-#endif
+#include <asm/global_data.h>
 #endif
 #ifndef __U_BOOT__
 #include <ctype.h>     /* isalpha, isdigit */
@@ -1675,7 +1673,7 @@ static int run_pipe_real(struct pipe *pi)
                        return -1;
                }
                /* Process the command */
-               return cmd_process(flag, child->argc, child->argv,
+               return cmd_process(flag, child->argc - i, child->argv + i,
                                   &flag_repeat, NULL);
 #endif
        }
@@ -1849,8 +1847,7 @@ static int run_list_real(struct pipe *pi)
                                continue;
                        } else {
                                /* insert new value from list for variable */
-                               if (pi->progs->argv[0])
-                                       free(pi->progs->argv[0]);
+                               free(pi->progs->argv[0]);
                                pi->progs->argv[0] = *list++;
 #ifndef __U_BOOT__
                                pi->progs->glob_result.gl_pathv[0] =
@@ -2171,14 +2168,6 @@ int set_local_var(const char *s, int flg_export)
 
        name=strdup(s);
 
-#ifdef __U_BOOT__
-       if (env_get(name) != NULL) {
-               printf ("ERROR: "
-                               "There is a global environment variable with the same name.\n");
-               free(name);
-               return -1;
-       }
-#endif
        /* Assume when we enter this function that we are already in
         * NAME=VALUE format.  So the first order of business is to
         * split 's' on the '=' into 'name' and 'value' */
@@ -3336,7 +3325,7 @@ static void *xmalloc(size_t size)
        void *p = NULL;
 
        if (!(p = malloc(size))) {
-           printf("ERROR : memory not allocated\n");
+           printf("ERROR : xmalloc failed\n");
            for(;;);
        }
        return p;
@@ -3347,7 +3336,7 @@ static void *xrealloc(void *ptr, size_t size)
        void *p = NULL;
 
        if (!(p = realloc(ptr, size))) {
-           printf("ERROR : memory not allocated\n");
+           printf("ERROR : xrealloc failed\n");
            for(;;);
        }
        return p;
@@ -3665,8 +3654,8 @@ static char *make_string(char **inp, int *nonnull)
 }
 
 #ifdef __U_BOOT__
-static int do_showvar(cmd_tbl_t *cmdtp, int flag, int argc,
-                     char * const argv[])
+static int do_showvar(struct cmd_tbl *cmdtp, int flag, int argc,
+                     char *const argv[])
 {
        int i, k;
        int rcode = 0;