瀏覽代碼

[libc]: fix the open issue when DFS disabled.

Bernard Xiong 7 年之前
父節點
當前提交
63b05a8c73
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      components/libc/newlib/syscalls.c

+ 3 - 0
components/libc/newlib/syscalls.c

@@ -465,6 +465,8 @@ void abort(void)
 
 int libc_console_init(void)
 {
+#ifdef RT_USING_DFS
+
     /* open console as stdin/stdout/stderr */
     __console_fd = open("/dev/console", O_RDWR, 0); /* for stdin/stdout/stderr */
 
@@ -479,6 +481,7 @@ int libc_console_init(void)
 
 		_GLOBAL_REENT->__sdidinit = 1;
 	}
+#endif
 
     return 0;
 }