diff options
| author | Bernard Xiong <[email protected]> | 2015-12-02 23:28:05 +0800 |
|---|---|---|
| committer | Bernard Xiong <[email protected]> | 2015-12-02 23:28:05 +0800 |
| commit | d2aee2539125e2910bdd06d7931ee66ffbc6359d (patch) | |
| tree | 5ffda6b1be1928789ce8b8dcdc5238566ff83ec7 /components/finsh | |
| parent | 2c7c049af05ed7a5bf2e56f5b169331ebe082dc1 (diff) | |
| parent | 1eea52307bbc03220ce87b12ca5b9b927afaf4b6 (diff) | |
Merge pull request #593 from SchumyHao/master
finsh: change no echo mode. cpp: remove RT_USE_LIBC depends
Diffstat (limited to 'components/finsh')
| -rw-r--r-- | components/finsh/shell.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/components/finsh/shell.c b/components/finsh/shell.c index 8962a7333f..a04214b727 100644 --- a/components/finsh/shell.c +++ b/components/finsh/shell.c @@ -200,7 +200,8 @@ void finsh_run_line(struct finsh_parser *parser, const char *line) { const char *err_str; - rt_kprintf("\n"); + if(shell->echo_mode) + rt_kprintf("\n"); finsh_parser_run(parser, (unsigned char *)line); /* compile node root */ @@ -489,7 +490,8 @@ void finsh_thread_entry(void *parameter) #ifdef FINSH_USING_MSH if (msh_is_used() == RT_TRUE) { - rt_kprintf("\n"); + if (shell->echo_mode) + rt_kprintf("\n"); msh_exec(shell->line, shell->line_position); } else @@ -500,7 +502,8 @@ void finsh_thread_entry(void *parameter) shell->line[shell->line_position] = ';'; if (shell->line_position != 0) finsh_run_line(&shell->parser, shell->line); - else rt_kprintf("\n"); + else + if (shell->echo_mode) rt_kprintf("\n"); #endif } |
