fs: Simplify sendfile implementation

and avoid call nx_ file API in the kernel space

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Id951ca161df2c2ee267dc4b5a0d7dfa67df4c1e6
This commit is contained in:
Xiang Xiao
2021-07-10 23:52:17 +08:00
committed by Gustavo Henrique Nihei
parent 2e0901fcaa
commit 663104a2e9
24 changed files with 299 additions and 394 deletions
+2 -2
View File
@@ -35,8 +35,8 @@
/* Configuration ************************************************************/
#ifndef CONFIG_LIB_SENDFILE_BUFSIZE
# define CONFIG_LIB_SENDFILE_BUFSIZE 512
#ifndef CONFIG_SENDFILE_BUFSIZE
# define CONFIG_SENDFILE_BUFSIZE 512
#endif
/****************************************************************************
+1 -4
View File
@@ -247,6 +247,7 @@ SYSCALL_LOOKUP(fstat, 2)
SYSCALL_LOOKUP(statfs, 2)
SYSCALL_LOOKUP(fstatfs, 2)
SYSCALL_LOOKUP(telldir, 1)
SYSCALL_LOOKUP(sendfile, 4)
#if defined(CONFIG_FS_RAMMAP)
SYSCALL_LOOKUP(munmap, 2)
@@ -270,10 +271,6 @@ SYSCALL_LOOKUP(telldir, 1)
SYSCALL_LOOKUP(nxsched_get_streams, 0)
#endif
#ifdef CONFIG_NET_SENDFILE
SYSCALL_LOOKUP(sendfile, 4)
#endif
#ifndef CONFIG_DISABLE_MOUNTPOINT
SYSCALL_LOOKUP(mount, 5)
SYSCALL_LOOKUP(fsync, 1)