mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
Squashed commit of the following:
fs: Add truncate() support for userfs
fs/unionfs: Add truncate() support to the unionfs
fs/tmpfs: Add ftruncate() support to tmpfs
syscall/: Add system call support for ftruncate()
net/route: Adding ftruncate() support eliminates an issue in file-based routing table management.
fs: Add basic framework to support truncate() and ftruncate(). The infrastructure is complete. Now, however, the actual implementation of ftruncate() will have to be done for each file system.
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
"fstat","sys/stat.h","CONFIG_NFILE_DESCRIPTORS > 0","int","int","FAR struct stat*"
|
||||
"fstatfs","sys/statfs.h","CONFIG_NFILE_DESCRIPTORS > 0","int","int","FAR struct statfs*"
|
||||
"fsync","unistd.h","CONFIG_NFILE_DESCRIPTORS > 0 && !defined(CONFIG_DISABLE_MOUNTPOINT)","int","int"
|
||||
"ftruncate","unistd.h","CONFIG_NFILE_DESCRIPTORS > 0 && !defined(CONFIG_DISABLE_MOUNTPOINT)","int","int","off_t"
|
||||
"get_errno","errno.h","!defined(__DIRECT_ERRNO_ACCESS)","int"
|
||||
"get_errno_ptr","errno.h","defined(__DIRECT_ERRNO_ACCESS)","FAR int*"
|
||||
"getenv","stdlib.h","!defined(CONFIG_DISABLE_ENVIRON)","FAR char*","FAR const char*"
|
||||
|
||||
|
@@ -269,6 +269,7 @@ SYSCALL_LOOKUP(up_assert, 2, STUB_up_assert)
|
||||
SYSCALL_LOOKUP(mount, 5, STUB_mount)
|
||||
# endif
|
||||
SYSCALL_LOOKUP(fsync, 1, STUB_fsync)
|
||||
SYSCALL_LOOKUP(ftruncate, 2, STUB_ftruncate)
|
||||
SYSCALL_LOOKUP(mkdir, 2, STUB_mkdir)
|
||||
SYSCALL_LOOKUP(rename, 2, STUB_rename)
|
||||
SYSCALL_LOOKUP(rmdir, 1, STUB_rmdir)
|
||||
|
||||
@@ -258,6 +258,7 @@ uintptr_t STUB_sched_getstreams(int nbr);
|
||||
ssize_t sendfile(int outfd, int infd, FAR off_t *offset, size_t count);
|
||||
|
||||
uintptr_t STUB_fsync(int nbr, uintptr_t parm1);
|
||||
uintptr_t STUB_ftruncate(int nbr, uintptr_t parm1, uintptr_t parm2);
|
||||
uintptr_t STUB_mkdir(int nbr, uintptr_t parm1, uintptr_t parm2);
|
||||
uintptr_t STUB_mount(int nbr, uintptr_t parm1, uintptr_t parm2,
|
||||
uintptr_t parm3, uintptr_t parm4, uintptr_t parm5);
|
||||
|
||||
Reference in New Issue
Block a user