]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/main.c
TX6 Release 2013-04-22
[karo-tx-uboot.git] / common / main.c
index e2d2e09bf9f750bc278fa8d5f452c63ccc6ad1e2..31d6331fa161863d30ec0eecb32133907f14bfcd 100644 (file)
@@ -547,9 +547,9 @@ void main_loop (void)
                else
                        rc = run_command(lastcommand, flag);
 
-               if (rc <= 0) {
+               if (rc || len < 0) {
                        /* invalid command or not repeatable, forget it */
-                       lastcommand[0] = 0;
+                       lastcommand[0] = '\0';
                }
        }
 #endif /*CONFIG_SYS_HUSH_PARSER*/
@@ -1050,6 +1050,13 @@ int readline_into_buffer(const char *const prompt, char *buffer, int timeout)
                if (prompt)
                        puts (prompt);
 
+#ifdef CONFIG_SHOW_ACTIVITY
+               while (!tstc()) {
+                       extern void show_activity(int arg);
+                       show_activity(0);
+                       WATCHDOG_RESET();
+               }
+#endif
                rc = cread_line(prompt, p, &len, timeout);
                return rc < 0 ? rc : len;
 
@@ -1452,7 +1459,7 @@ static int builtin_run_command(const char *cmd, int flag)
                        continue;
                }
 
-               if (cmd_process(flag, argc, argv, &repeatable, NULL))
+               if (cmd_process(flag, argc, argv, &repeatable, NULL) != CMD_RET_SUCCESS)
                        rc = -1;
 
                /* Did the user stop this? */