remove the dependence of device file system when enable newlib.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1955 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
bernard.xiong@gmail.com
2012-02-17 16:26:49 +00:00
parent c11a30dbc1
commit db2ceea2ce
2 changed files with 49 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ void libc_system_init(const char* tty_name)
int fd;
extern int pthread_system_init(void);
#ifdef RT_USING_DFS
#ifndef RT_USING_DFS_DEVFS
#error Please enable devfs by defining RT_USING_DFS_DEVFS in rtconfig.h
#endif
@@ -21,6 +22,7 @@ void libc_system_init(const char* tty_name)
fd = open("/dev/console", O_RDONLY, 0); /* for stdin */
fd = open("/dev/console", O_WRONLY, 0); /* for stdout */
fd = open("/dev/console", O_WRONLY, 0); /* for stderr */
#endif
/* set PATH and HOME */
putenv("PATH=/");