diff options
author | dchagin <dchagin@FreeBSD.org> | 2016-03-20 13:21:20 +0000 |
---|---|---|
committer | dchagin <dchagin@FreeBSD.org> | 2016-03-20 13:21:20 +0000 |
commit | 6aee9bb2b457e5615395d8e3a5527d87e6fe441f (patch) | |
tree | 72f0f3b0305a0d70d52c33f5951a0b56738a2fc9 /sys/compat/linux/linux_stats.c | |
parent | 0fe879224d0f65dcaeef238ff8075b49a863b1f2 (diff) | |
download | FreeBSD-src-6aee9bb2b457e5615395d8e3a5527d87e6fe441f.zip FreeBSD-src-6aee9bb2b457e5615395d8e3a5527d87e6fe441f.tar.gz |
Implement fstatfs64 system call.
PR: 181012
Submitted by: John Wehle
MFC after: 1 week
Diffstat (limited to 'sys/compat/linux/linux_stats.c')
-rw-r--r-- | sys/compat/linux/linux_stats.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c index 84ade7b..6adaba9 100644 --- a/sys/compat/linux/linux_stats.c +++ b/sys/compat/linux/linux_stats.c @@ -460,6 +460,27 @@ linux_statfs64(struct thread *td, struct linux_statfs64_args *args) bsd_to_linux_statfs64(&bsd_statfs, &linux_statfs); return copyout(&linux_statfs, args->buf, sizeof(linux_statfs)); } + +int +linux_fstatfs64(struct thread *td, struct linux_fstatfs64_args *args) +{ + struct l_statfs64 linux_statfs; + struct statfs bsd_statfs; + int error; + +#ifdef DEBUG + if (ldebug(fstatfs64)) + printf(ARGS(fstatfs64, "%d, *"), args->fd); +#endif + if (args->bufsize != sizeof(struct l_statfs64)) + return (EINVAL); + + error = kern_fstatfs(td, args->fd, &bsd_statfs); + if (error) + return error; + bsd_to_linux_statfs64(&bsd_statfs, &linux_statfs); + return (copyout(&linux_statfs, args->buf, sizeof(linux_statfs))); +} #endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */ int |