diff options
-rw-r--r-- | sys/amd64/linux32/linux32_machdep.c | 5 | ||||
-rw-r--r-- | sys/compat/freebsd32/freebsd32_misc.c | 10 | ||||
-rw-r--r-- | sys/compat/linux/linux_file.c | 9 | ||||
-rw-r--r-- | sys/i386/linux/linux_machdep.c | 5 | ||||
-rw-r--r-- | sys/kern/vfs_syscalls.c | 5 |
5 files changed, 6 insertions, 28 deletions
diff --git a/sys/amd64/linux32/linux32_machdep.c b/sys/amd64/linux32/linux32_machdep.c index 74f9315..dd741e6 100644 --- a/sys/amd64/linux32/linux32_machdep.c +++ b/sys/amd64/linux32/linux32_machdep.c @@ -645,7 +645,6 @@ linux_sigaltstack(struct thread *td, struct linux_sigaltstack_args *uap) int linux_ftruncate64(struct thread *td, struct linux_ftruncate64_args *args) { - struct ftruncate_args sa; #ifdef DEBUG if (ldebug(ftruncate64)) @@ -653,9 +652,7 @@ linux_ftruncate64(struct thread *td, struct linux_ftruncate64_args *args) (intmax_t)args->length); #endif - sa.fd = args->fd; - sa.length = args->length; - return sys_ftruncate(td, &sa); + return (kern_ftruncate(td, args->fd, args->length)); } int diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index b693495..2e1dd77 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -1507,11 +1507,8 @@ freebsd32_truncate(struct thread *td, struct freebsd32_truncate_args *uap) int freebsd32_ftruncate(struct thread *td, struct freebsd32_ftruncate_args *uap) { - struct ftruncate_args ap; - ap.fd = uap->fd; - ap.length = PAIR32TO64(off_t,uap->length); - return (sys_ftruncate(td, &ap)); + return (kern_ftruncate(td, uap->fd, PAIR32TO64(off_t, uap->length))); } #ifdef COMPAT_43 @@ -1613,11 +1610,8 @@ freebsd6_freebsd32_truncate(struct thread *td, struct freebsd6_freebsd32_truncat int freebsd6_freebsd32_ftruncate(struct thread *td, struct freebsd6_freebsd32_ftruncate_args *uap) { - struct ftruncate_args ap; - ap.fd = uap->fd; - ap.length = PAIR32TO64(off_t,uap->length); - return (sys_ftruncate(td, &ap)); + return (kern_ftruncate(td, uap->fd, PAIR32TO64(off_t, uap->length))); } #endif /* COMPAT_FREEBSD6 */ diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index dfc7f7c..00834e2 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -940,15 +940,8 @@ linux_truncate64(struct thread *td, struct linux_truncate64_args *args) int linux_ftruncate(struct thread *td, struct linux_ftruncate_args *args) { - struct ftruncate_args /* { - int fd; - int pad; - off_t length; - } */ nuap; - nuap.fd = args->fd; - nuap.length = args->length; - return (sys_ftruncate(td, &nuap)); + return (kern_ftruncate(td, args->fd, args->length)); } int diff --git a/sys/i386/linux/linux_machdep.c b/sys/i386/linux/linux_machdep.c index 4b4b886..36e8df2 100644 --- a/sys/i386/linux/linux_machdep.c +++ b/sys/i386/linux/linux_machdep.c @@ -611,7 +611,6 @@ linux_sigaltstack(struct thread *td, struct linux_sigaltstack_args *uap) int linux_ftruncate64(struct thread *td, struct linux_ftruncate64_args *args) { - struct ftruncate_args sa; #ifdef DEBUG if (ldebug(ftruncate64)) @@ -619,9 +618,7 @@ linux_ftruncate64(struct thread *td, struct linux_ftruncate64_args *args) (intmax_t)args->length); #endif - sa.fd = args->fd; - sa.length = args->length; - return sys_ftruncate(td, &sa); + return (kern_ftruncate(td, args->fd, args->length)); } int diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 0490694..21e3a44 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -3363,11 +3363,8 @@ freebsd6_truncate(struct thread *td, struct freebsd6_truncate_args *uap) int freebsd6_ftruncate(struct thread *td, struct freebsd6_ftruncate_args *uap) { - struct ftruncate_args ouap; - ouap.fd = uap->fd; - ouap.length = uap->length; - return (sys_ftruncate(td, &ouap)); + return (kern_ftruncate(td, uap->fd, uap->length)); } #endif |