From f1e92c63f2fad4f186be65e39b4c59095202b646 Mon Sep 17 00:00:00 2001 From: SchumyHao Date: Fri, 13 Nov 2015 00:56:50 +0800 Subject: [PATCH 1/2] finsh: check echo_mode before print '\n' when excute msh command Signed-off-by: SchumyHao --- components/finsh/shell.c | 9 ++++++--- 1 file 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 } From 1eea52307bbc03220ce87b12ca5b9b927afaf4b6 Mon Sep 17 00:00:00 2001 From: SchumyHao Date: Sun, 15 Nov 2015 16:36:57 +0800 Subject: [PATCH 2/2] rm CPP's RT_USE_LIBC depends Signed-off-by: SchumyHao --- components/cplusplus/SConscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/cplusplus/SConscript b/components/cplusplus/SConscript index b41537a52b..63f68ec3d8 100644 --- a/components/cplusplus/SConscript +++ b/components/cplusplus/SConscript @@ -6,6 +6,6 @@ cwd = GetCurrentDir() src = Glob('*.cpp') + Glob('*.c') CPPPATH = [cwd] -group = DefineGroup('CPlusPlus', src, depend = ['RT_USING_CPLUSPLUS', 'RT_USING_LIBC'], CPPPATH = CPPPATH) +group = DefineGroup('CPlusPlus', src, depend = ['RT_USING_CPLUSPLUS'], CPPPATH = CPPPATH) Return('group')