From owner-svn-src-all@freebsd.org Mon Jan 30 11:50:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2ADECC665A; Mon, 30 Jan 2017 11:50:55 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D30C19D4; Mon, 30 Jan 2017 11:50:55 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0UBos4o037621; Mon, 30 Jan 2017 11:50:54 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0UBoswd037616; Mon, 30 Jan 2017 11:50:54 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201701301150.v0UBoswd037616@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 30 Jan 2017 11:50:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312986 - in head/sys: amd64/linux32 compat/freebsd32 compat/linux i386/linux kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 11:50:55 -0000 Author: trasz Date: Mon Jan 30 11:50:54 2017 New Revision: 312986 URL: https://svnweb.freebsd.org/changeset/base/312986 Log: Replace sys_ftruncate() with kern_ftruncate() in various compats. Reviewed by: kib@ MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9368 Modified: head/sys/amd64/linux32/linux32_machdep.c head/sys/compat/freebsd32/freebsd32_misc.c head/sys/compat/linux/linux_file.c head/sys/i386/linux/linux_machdep.c head/sys/kern/vfs_syscalls.c Modified: head/sys/amd64/linux32/linux32_machdep.c ============================================================================== --- head/sys/amd64/linux32/linux32_machdep.c Mon Jan 30 11:46:06 2017 (r312985) +++ head/sys/amd64/linux32/linux32_machdep.c Mon Jan 30 11:50:54 2017 (r312986) @@ -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: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Mon Jan 30 11:46:06 2017 (r312985) +++ head/sys/compat/freebsd32/freebsd32_misc.c Mon Jan 30 11:50:54 2017 (r312986) @@ -1517,11 +1517,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 @@ -1623,11 +1620,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: head/sys/compat/linux/linux_file.c ============================================================================== --- head/sys/compat/linux/linux_file.c Mon Jan 30 11:46:06 2017 (r312985) +++ head/sys/compat/linux/linux_file.c Mon Jan 30 11:50:54 2017 (r312986) @@ -939,15 +939,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: head/sys/i386/linux/linux_machdep.c ============================================================================== --- head/sys/i386/linux/linux_machdep.c Mon Jan 30 11:46:06 2017 (r312985) +++ head/sys/i386/linux/linux_machdep.c Mon Jan 30 11:50:54 2017 (r312986) @@ -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: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Mon Jan 30 11:46:06 2017 (r312985) +++ head/sys/kern/vfs_syscalls.c Mon Jan 30 11:50:54 2017 (r312986) @@ -3365,11 +3365,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