summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2011-11-14 18:00:15 +0000
committerjhb <jhb@FreeBSD.org>2011-11-14 18:00:15 +0000
commit9315d9d42cc5f041dacb6e324a9c1b58aafb2dd7 (patch)
treec65b53bda22ffe4d632d919b80c5e3f6cb529bd6 /sys/compat
parent6521dad4b689c989139dc6ee11871319ae830cd6 (diff)
downloadFreeBSD-src-9315d9d42cc5f041dacb6e324a9c1b58aafb2dd7.zip
FreeBSD-src-9315d9d42cc5f041dacb6e324a9c1b58aafb2dd7.tar.gz
- Split out a kern_posix_fadvise() from the posix_fadvise() system call so
it can be used by in-kernel consumers. - Make kern_posix_fallocate() public. - Use kern_posix_fadvise() and kern_posix_fallocate() to implement the freebsd32 wrappers for the two system calls.
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/freebsd32/freebsd32_misc.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c
index 83ee962..9390bc6 100644
--- a/sys/compat/freebsd32/freebsd32_misc.c
+++ b/sys/compat/freebsd32/freebsd32_misc.c
@@ -2828,23 +2828,16 @@ int
freebsd32_posix_fallocate(struct thread *td,
struct freebsd32_posix_fallocate_args *uap)
{
- struct posix_fallocate_args ap;
- ap.fd = uap->fd;
- ap.offset = PAIR32TO64(off_t, uap->offset);
- ap.len = PAIR32TO64(off_t, uap->len);
- return (sys_posix_fallocate(td, &ap));
+ return (kern_posix_fallocate(td, uap->fd,
+ PAIR32TO64(off_t, uap->offset), PAIR32TO64(off_t, uap->len)));
}
int
freebsd32_posix_fadvise(struct thread *td,
struct freebsd32_posix_fadvise_args *uap)
{
- struct posix_fadvise_args ap;
- ap.fd = uap->fd;
- ap.offset = PAIR32TO64(off_t, uap->offset);
- ap.len = PAIR32TO64(off_t, uap->len);
- ap.advice = uap->advice;
- return (sys_posix_fadvise(td, &ap));
+ return (kern_posix_fadvise(td, uap->fd, PAIR32TO64(off_t, uap->offset),
+ PAIR32TO64(off_t, uap->len), uap->advice));
}
OpenPOWER on IntegriCloud