From owner-svn-src-all@FreeBSD.ORG Tue Nov 26 08:32:38 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 12A8C9B4; Tue, 26 Nov 2013 08:32:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 018AB2B87; Tue, 26 Nov 2013 08:32:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQ8Wbdc076381; Tue, 26 Nov 2013 08:32:37 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQ8Wb8o076380; Tue, 26 Nov 2013 08:32:37 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201311260832.rAQ8Wb8o076380@svn.freebsd.org> From: Adrian Chadd Date: Tue, 26 Nov 2013 08:32:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258621 - head/sys/compat/freebsd32 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.16 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: Tue, 26 Nov 2013 08:32:38 -0000 Author: adrian Date: Tue Nov 26 08:32:37 2013 New Revision: 258621 URL: http://svnweb.freebsd.org/changeset/base/258621 Log: Fix the compat32 sendfile() to be in line with my recent changes. Reminded by: kib Modified: head/sys/compat/freebsd32/freebsd32_misc.c Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Tue Nov 26 08:07:45 2013 (r258620) +++ head/sys/compat/freebsd32/freebsd32_misc.c Tue Nov 26 08:32:37 2013 (r258621) @@ -1652,6 +1652,7 @@ freebsd32_do_sendfile(struct thread *td, cap_rights_t rights; off_t offset; int error; + off_t sbytes; offset = PAIR32TO64(off_t, uap->offset); if (offset < 0) @@ -1692,8 +1693,10 @@ freebsd32_do_sendfile(struct thread *td, } error = fo_sendfile(fp, uap->s, hdr_uio, trl_uio, offset, - uap->nbytes, uap->sbytes, uap->flags, compat ? SFK_COMPAT : 0, td); + uap->nbytes, &sbytes, uap->flags, compat ? SFK_COMPAT : 0, td); fdrop(fp, td); + if (uap->sbytes != NULL) + copyout(&sbytes, uap->sbytes, sizeof(off_t)); out: if (hdr_uio)