Date: Sun, 19 Mar 2017 14:12:55 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r315548 - in stable/11/sys: amd64/linux32 compat/freebsd32 compat/linux i386/linux kern Message-ID: <201703191412.v2JECtGN060806@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trasz Date: Sun Mar 19 14:12:55 2017 New Revision: 315548 URL: https://svnweb.freebsd.org/changeset/base/315548 Log: MFC r312986: Replace sys_ftruncate() with kern_ftruncate() in various compats. Sponsored by: DARPA, AFRL Modified: stable/11/sys/amd64/linux32/linux32_machdep.c stable/11/sys/compat/freebsd32/freebsd32_misc.c stable/11/sys/compat/linux/linux_file.c stable/11/sys/i386/linux/linux_machdep.c stable/11/sys/kern/vfs_syscalls.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/linux32/linux32_machdep.c ============================================================================== --- stable/11/sys/amd64/linux32/linux32_machdep.c Sun Mar 19 14:09:02 2017 (r315547) +++ stable/11/sys/amd64/linux32/linux32_machdep.c Sun Mar 19 14:12:55 2017 (r315548) @@ -645,7 +645,6 @@ linux_sigaltstack(struct thread *td, str 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, str (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 Modified: stable/11/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/11/sys/compat/freebsd32/freebsd32_misc.c Sun Mar 19 14:09:02 2017 (r315547) +++ stable/11/sys/compat/freebsd32/freebsd32_misc.c Sun Mar 19 14:12:55 2017 (r315548) @@ -1507,11 +1507,8 @@ freebsd32_truncate(struct thread *td, st 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 threa 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 */ Modified: stable/11/sys/compat/linux/linux_file.c ============================================================================== --- stable/11/sys/compat/linux/linux_file.c Sun Mar 19 14:09:02 2017 (r315547) +++ stable/11/sys/compat/linux/linux_file.c Sun Mar 19 14:12:55 2017 (r315548) @@ -940,15 +940,8 @@ linux_truncate64(struct thread *td, stru 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 Modified: stable/11/sys/i386/linux/linux_machdep.c ============================================================================== --- stable/11/sys/i386/linux/linux_machdep.c Sun Mar 19 14:09:02 2017 (r315547) +++ stable/11/sys/i386/linux/linux_machdep.c Sun Mar 19 14:12:55 2017 (r315548) @@ -611,7 +611,6 @@ linux_sigaltstack(struct thread *td, str 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, str (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 Modified: stable/11/sys/kern/vfs_syscalls.c ============================================================================== --- stable/11/sys/kern/vfs_syscalls.c Sun Mar 19 14:09:02 2017 (r315547) +++ stable/11/sys/kern/vfs_syscalls.c Sun Mar 19 14:12:55 2017 (r315548) @@ -3363,11 +3363,8 @@ freebsd6_truncate(struct thread *td, str 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703191412.v2JECtGN060806>