Merge pull request #2157 from zhaojuntao/fix-dfs
[components][dfs] Refix #2100 PR
This commit is contained in:
commit
ff8a2709ea
|
@ -18,7 +18,7 @@
|
||||||
#include <lwp.h>
|
#include <lwp.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef RT_USING_DFS_DEVFS
|
#if defined(RT_USING_DFS_DEVFS) && defined(RT_USING_POSIX)
|
||||||
#include <libc.h>
|
#include <libc.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -216,7 +216,7 @@ struct dfs_fd *fd_get(int fd)
|
||||||
struct dfs_fd *d;
|
struct dfs_fd *d;
|
||||||
struct dfs_fdtable *fdt;
|
struct dfs_fdtable *fdt;
|
||||||
|
|
||||||
#ifdef RT_USING_DFS_DEVFS
|
#if defined(RT_USING_DFS_DEVFS) && defined(RT_USING_POSIX)
|
||||||
if ((0 <= fd) && (fd <= 2))
|
if ((0 <= fd) && (fd <= 2))
|
||||||
fd = libc_stdio_get_console();
|
fd = libc_stdio_get_console();
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue