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*/
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;
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? */