mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-02-18 18:39:11 +08:00
[libc]: fix the open issue when DFS disabled.
This commit is contained in:
parent
14faf8a77a
commit
63b05a8c73
@ -465,6 +465,8 @@ void abort(void)
|
|||||||
|
|
||||||
int libc_console_init(void)
|
int libc_console_init(void)
|
||||||
{
|
{
|
||||||
|
#ifdef RT_USING_DFS
|
||||||
|
|
||||||
/* open console as stdin/stdout/stderr */
|
/* open console as stdin/stdout/stderr */
|
||||||
__console_fd = open("/dev/console", O_RDWR, 0); /* for 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;
|
_GLOBAL_REENT->__sdidinit = 1;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user