svn commit: r258621 - head/sys/compat/freebsd32

Adrian Chadd adrian at FreeBSD.org
Tue Nov 26 08:32:38 UTC 2013


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)


More information about the svn-src-all mailing list