summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authoraozima <[email protected]>2018-07-02 09:56:12 +0800
committeraozima <[email protected]>2018-07-02 09:56:12 +0800
commite49a29f2dc306213a73a4f3c68d1ac9a34f49d9a (patch)
tree2ec4b0f12f2aa073df795fed836407d659cb0821 /components
parent9df6acc067bbba41099e501aa4d8efcdddfbaee2 (diff)
[shell] add re-initial check.
Diffstat (limited to 'components')
-rw-r--r--components/finsh/shell.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/components/finsh/shell.c b/components/finsh/shell.c
index 6bdb418120..66a0141de2 100644
--- a/components/finsh/shell.c
+++ b/components/finsh/shell.c
@@ -726,6 +726,12 @@ int finsh_system_init(void)
rt_err_t result = RT_EOK;
rt_thread_t tid;
+ if(shell)
+ {
+ rt_kprintf("finsh shell already init.\n");
+ return RT_EOK;
+ }
+
#ifdef FINSH_USING_SYMTAB
#ifdef __CC_ARM /* ARM C Compiler */
extern const int FSymTab$$Base;