Register `fstatfs` system call to syscall_shim library.
Signed-off-by: Sergiu Moga <sergiu.moga@protonmail.com>
Reviewed-by: Cezar Craciunoiu <cezar.craciunoiu@gmail.com>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Pull-Request: #144
UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += mount-5
UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += ioctl-3
UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += statfs-2
+UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += fstatfs-2
readdir_r
readdir64_r
fstatfs
+uk_syscall_e_fstatfs
+uk_syscall_r_fstatfs
eaccess
euidaccess
rename
trace_vfs_fstatfs_ret();
return 0;
- out_errno:
+out_errno:
trace_vfs_fstatfs_err(error);
- errno = error;
- return -1;
+ return -error;
+}
+
+UK_SYSCALL_R_DEFINE(int, fstatfs, int, fd, struct statfs*, buf)
+{
+ return __fstatfs(fd, buf);
}
-__weak_alias(__fstatfs, fstatfs);
LFS64(fstatfs);