mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-12-27 09:38:24 +00:00
Revert "[libc]&[dfs] remove unnecessary RT_USING_POSIX and RT_USING_DFS_DEVFS"
This commit is contained in:
committed by
GitHub
parent
92ea0ec8c7
commit
8c01acc667
@@ -187,14 +187,14 @@ int _sys_write(FILEHANDLE fh, const unsigned char *buf, unsigned len, int mode)
|
||||
{
|
||||
#ifdef RT_USING_DFS
|
||||
int size;
|
||||
#endif /* RT_USING_DFS */
|
||||
#endif
|
||||
|
||||
if ((fh == STDOUT) || (fh == STDERR))
|
||||
{
|
||||
#if !defined(RT_USING_CONSOLE) || !defined(RT_USING_DEVICE)
|
||||
return 0;
|
||||
#else
|
||||
#ifdef RT_USING_DFS
|
||||
#ifdef RT_USING_POSIX
|
||||
if (libc_stdio_get_console() < 0)
|
||||
{
|
||||
LOG_W("Do not invoke standard input before initializing libc");
|
||||
@@ -210,8 +210,8 @@ int _sys_write(FILEHANDLE fh, const unsigned char *buf, unsigned len, int mode)
|
||||
}
|
||||
|
||||
return -1;
|
||||
#endif /* RT_USING_DFS */
|
||||
#endif /* !defined(RT_USING_CONSOLE) || !defined(RT_USING_DEVICE) */
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
else if (fh == STDIN)
|
||||
{
|
||||
@@ -226,7 +226,7 @@ int _sys_write(FILEHANDLE fh, const unsigned char *buf, unsigned len, int mode)
|
||||
return len - size;
|
||||
else
|
||||
return -1;
|
||||
#endif /* RT_USING_DFS */
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user