diff --git a/kernel/include/sys/select.h b/kernel/include/sys/select.h index 28d7689c8a63a60f36dd09dc6f630ba468bbed49..8880e86f7b980e6436ba4b6fc1b3a04145768be6 100644 --- a/kernel/include/sys/select.h +++ b/kernel/include/sys/select.h @@ -15,9 +15,14 @@ extern "C" { #include #include +#ifdef LOSCFG_FS_VFS #include "vfs_config.h" /* FD_SETSIZE is defined in "vfs_config.h" */ +#else +#define FD_SETSIZE 512 +#define FD_SET_TOTAL_SIZE FD_SETSIZE +#endif typedef unsigned long fd_mask; diff --git a/kernel/src/exit/exit.c b/kernel/src/exit/exit.c index 4041b0068e0cc8a5a183bf0766de36f9ecd48a61..4fd2028ca943e193bd1f86e8fc9564227956ee7b 100644 --- a/kernel/src/exit/exit.c +++ b/kernel/src/exit/exit.c @@ -35,6 +35,7 @@ void _exit(int status) { PRINT_ERR("%s NOT SUPPORT\n", __FUNCTION__); errno = ENOSYS; + while (1); } void exit(int status) { diff --git a/kernel/src/stdio/__stdio_seek.c b/kernel/src/stdio/__stdio_seek.c index 7dc17617942d802f18982b4b6ad7dc8a49108754..9e93feb0447bde655d12308c56e166b18c4da03c 100755 --- a/kernel/src/stdio/__stdio_seek.c +++ b/kernel/src/stdio/__stdio_seek.c @@ -2,6 +2,7 @@ #include #include #include +#ifdef LOSCFG_FS_VFS #include static off64_t __stdio_lseek64(int fd, int offsetHigh, int offsetLow, off64_t *result, int whence) @@ -53,3 +54,4 @@ off_t __stdio_seek(FILE *f, off_t off, int whence) off_t result = 0; return __stdio_lseek64(f->fd, off>>32, off, &result, whence) ? -1 : result; } +#endif diff --git a/kernel/src/stdio/fclose.c b/kernel/src/stdio/fclose.c index b513a007f030cd4fb4ac42e24ef677ecb28f09c6..c53f3cd6e6b7fa621b684f64e70f464a75aec671 100644 --- a/kernel/src/stdio/fclose.c +++ b/kernel/src/stdio/fclose.c @@ -3,8 +3,6 @@ #ifdef LOSCFG_LLTSER #include "gcov_ser.h" #endif -#include "fs/fs.h" -#include "fs/file.h" static void dummy(FILE *f) { } weak_alias(dummy, __unlist_locked_file); diff --git a/kernel/src/stdio/fopen.c b/kernel/src/stdio/fopen.c index adfc34fe71add0cc3b3d03de635322f7bfc046bd..37d91130f476b49d783b3fc4c21dc73bcb2f0190 100644 --- a/kernel/src/stdio/fopen.c +++ b/kernel/src/stdio/fopen.c @@ -7,8 +7,6 @@ #ifdef LOSCFG_LLTSER #include "gcov_ser.h" #endif -#include "fs/fs.h" -#include "fs/file.h" FILE *fopen(const char *restrict filename, const char *restrict mode) { diff --git a/kernel/src/stdio/fread.c b/kernel/src/stdio/fread.c index 69e41fcc5982a9d758650d2364a7c5f834aba893..5d3b869ef9f918cde3a3e0a889151b46f78609a1 100644 --- a/kernel/src/stdio/fread.c +++ b/kernel/src/stdio/fread.c @@ -3,8 +3,6 @@ #ifdef LOSCFG_LLTSER #include "gcov_ser.h" #endif -#include "fs/fs.h" -#include "fs/file.h" #define MIN(a,b) ((a)<(b) ? (a) : (b)) diff --git a/kernel/src/stdio/remove.c b/kernel/src/stdio/remove.c index 1825fd171a79c85a85643f5b4975a64a04f30041..84549a560cc5fe2ec1360cd27597dbff2dd9d726 100644 --- a/kernel/src/stdio/remove.c +++ b/kernel/src/stdio/remove.c @@ -2,8 +2,6 @@ #include #include #include -#include "fs/fs.h" -#include "fs/file.h" int remove(const char *path) { diff --git a/kernel/src/stdio/vfprintf.c b/kernel/src/stdio/vfprintf.c index b721461f549ec4849f1e7140e8888ff62f0f6937..a5bcee8a14614a40ed51eb1f9ff00c250836ac9f 100644 --- a/kernel/src/stdio/vfprintf.c +++ b/kernel/src/stdio/vfprintf.c @@ -448,6 +448,7 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg, int t, pl; wchar_t wc[2], *ws; char mb[4]; +#ifdef LOSCFG_FS_VFS struct winsize wsz; if (f && (f->write == __stdout_write) && !ioctl(f->fd, TIOCGWINSZ, &wsz)) { @@ -456,6 +457,7 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg, f->wpos = f->wbase = f->buf; f->wend = f->buf + f->buf_size; } +#endif for (;;) { /* This error is only specified for snprintf, but since it's * unspecified for other forms, do the same. Stop immediately