[posix][libc] 优化libc中posix结构

This commit is contained in:
Meco Man
2021-10-26 00:51:32 -04:00
parent 50bb6e33d1
commit a9910a780e
36 changed files with 361 additions and 704 deletions

View File

@@ -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 */
}