提交 04861823 编写于 作者: B bernard.xiong

add stdin, stdout, stderr implementation in newlib.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1031 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 fb7d4122
......@@ -12,9 +12,11 @@ void libc_system_init(const char* tty_name)
/* open console as stdin/stdout/stderr */
fd = open("/dev/console", O_RDONLY, 0); /* for stdin */
rt_kprintf("stdin: %d\n", fd);
fd = open("/dev/console", O_WRONLY, 0); /* for stdout */
rt_kprintf("stdout: %d\n", fd);
fd = open("/dev/console", O_WRONLY, 0); /* for stderr */
rt_kprintf("stderr: %d\n", fd);
/* set PATH and HOME */
putenv("PATH=/");
putenv("HOME=/");
}
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册