소스 검색

[shell] add re-initial check.

aozima 7 년 전
부모
커밋
e49a29f2dc
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      components/finsh/shell.c

+ 6 - 0
components/finsh/shell.c

@@ -726,6 +726,12 @@ int finsh_system_init(void)
     rt_err_t result = RT_EOK;
     rt_err_t result = RT_EOK;
     rt_thread_t tid;
     rt_thread_t tid;
 
 
+    if(shell)
+    {
+        rt_kprintf("finsh shell already init.\n");
+        return RT_EOK;
+    }
+
 #ifdef FINSH_USING_SYMTAB
 #ifdef FINSH_USING_SYMTAB
 #ifdef __CC_ARM                 /* ARM C Compiler */
 #ifdef __CC_ARM                 /* ARM C Compiler */
     extern const int FSymTab$$Base;
     extern const int FSymTab$$Base;