diff options
author | Peter Wemm <peter@FreeBSD.org> | 2007-07-04 22:57:21 +0000 |
---|---|---|
committer | Peter Wemm <peter@FreeBSD.org> | 2007-07-04 22:57:21 +0000 |
commit | c2815ad564f29ace8944b8dd302e870e2e005aa8 (patch) | |
tree | aba597bf8efc4ca951999b9075343fd6c9ee705a /sys/kern/vfs_syscalls.c | |
parent | e9ac9968aa9c3466f600ad791be7e3c86c692ce0 (diff) |
Add freebsd6_ wrappers for mmap/lseek/pread/pwrite/truncate/ftruncate
Approved by: re (kensmith)
Notes
Notes:
svn path=/head/; revision=171212
Diffstat (limited to 'sys/kern/vfs_syscalls.c')
-rw-r--r-- | sys/kern/vfs_syscalls.c | 39 |
1 files changed, 36 insertions, 3 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index d73c4a2188a6..819a74c73a8d 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1785,16 +1785,28 @@ olseek(td, uap) off_t offset; int whence; } */ nuap; - int error; nuap.fd = uap->fd; nuap.offset = uap->offset; nuap.whence = uap->whence; - error = lseek(td, &nuap); - return (error); + return (lseek(td, &nuap)); } #endif /* COMPAT_43 */ +/* Version with the 'pad' argument */ +int +freebsd6_lseek(td, uap) + struct thread *td; + register struct freebsd6_lseek_args *uap; +{ + struct lseek_args ouap; + + ouap.fd = uap->fd; + ouap.offset = uap->offset; + ouap.whence = uap->whence; + return (lseek(td, &ouap)); +} + /* * Check access permissions using passed credentials. */ @@ -3150,6 +3162,27 @@ oftruncate(td, uap) } #endif /* COMPAT_43 */ +/* Versions with the pad argument */ +int +freebsd6_truncate(struct thread *td, struct freebsd6_truncate_args *uap) +{ + struct truncate_args ouap; + + ouap.path = uap->path; + ouap.length = uap->length; + return (truncate(td, &ouap)); +} + +int +freebsd6_ftruncate(struct thread *td, struct freebsd6_ftruncate_args *uap) +{ + struct ftruncate_args ouap; + + ouap.fd = uap->fd; + ouap.length = uap->length; + return (ftruncate(td, &ouap)); +} + /* * Sync an open file. */ |