Extended the llfs file system api
Implemented file extension filters Implemented newlib stubs to be able to use the POSIX file API
This commit is contained in:
@@ -89,14 +89,14 @@ __attribute__((weak)) int _write(int file, char *ptr, int len)
|
||||
return len;
|
||||
}
|
||||
|
||||
int _close(int file)
|
||||
__attribute__((weak)) int _close(int file)
|
||||
{
|
||||
(void)file;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
int _fstat(int file, struct stat *st)
|
||||
__attribute__((weak)) int _fstat(int file, struct stat *st)
|
||||
{
|
||||
(void)file;
|
||||
st->st_mode = S_IFCHR;
|
||||
@@ -109,7 +109,7 @@ int _isatty(int file)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int _lseek(int file, int ptr, int dir)
|
||||
__attribute__((weak)) int _lseek(int file, int ptr, int dir)
|
||||
{
|
||||
(void)file;
|
||||
(void)ptr;
|
||||
@@ -117,7 +117,7 @@ int _lseek(int file, int ptr, int dir)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int _open(char *path, int flags, ...)
|
||||
__attribute__((weak)) int _open(char *path, int flags, ...)
|
||||
{
|
||||
(void)path;
|
||||
(void)flags;
|
||||
@@ -145,7 +145,7 @@ int _times(struct tms *buf)
|
||||
return -1;
|
||||
}
|
||||
|
||||
int _stat(char *file, struct stat *st)
|
||||
__attribute__((weak)) int _stat(char *file, struct stat *st)
|
||||
{
|
||||
(void)file;
|
||||
st->st_mode = S_IFCHR;
|
||||
|
||||
Reference in New Issue
Block a user