diff options
| author | [email protected] <[email protected]> | 2012-02-17 16:26:49 +0000 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2012-02-17 16:26:49 +0000 |
| commit | db2ceea2ce5dd9992be92de79d42ed0fe18ca71a (patch) | |
| tree | 04b7d122873a7b37322d44db1effd485f9c2518f /components/libc/newlib/libc.c | |
| parent | c11a30dbc122f77b6ecdc86ea1f47d4ff8dbad37 (diff) | |
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
Diffstat (limited to 'components/libc/newlib/libc.c')
| -rw-r--r-- | components/libc/newlib/libc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/components/libc/newlib/libc.c b/components/libc/newlib/libc.c index bd3797b6c4..797c393db8 100644 --- a/components/libc/newlib/libc.c +++ b/components/libc/newlib/libc.c @@ -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=/"); |
