mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-10-21 15:41:41 +08:00
[posix][libc] 优化libc中posix结构
This commit is contained in:
@@ -10,17 +10,13 @@
|
||||
|
||||
#include <rtthread.h>
|
||||
#include <yfuns.h>
|
||||
#ifdef RT_USING_DFS
|
||||
#include <dfs_posix.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
|
||||
#pragma module_name = "?__open"
|
||||
|
||||
int __open(const char *filename, int mode)
|
||||
{
|
||||
#ifndef RT_USING_DFS
|
||||
return _LLIO_ERROR;
|
||||
#else
|
||||
#ifdef RT_LIBC_USING_FILEIO
|
||||
int handle;
|
||||
int open_mode = O_RDONLY;
|
||||
|
||||
@@ -70,5 +66,7 @@ int __open(const char *filename, int mode)
|
||||
return _LLIO_ERROR;
|
||||
|
||||
return handle;
|
||||
#endif
|
||||
#else
|
||||
return _LLIO_ERROR;
|
||||
#endif /* RT_LIBC_USING_FILEIO */
|
||||
}
|
||||
|
Reference in New Issue
Block a user