aboutsummaryrefslogtreecommitdiff
path: root/sys/compat/freebsd32/freebsd32_misc.c
diff options
context:
space:
mode:
authorAdrian Chadd <adrian@FreeBSD.org>2013-11-26 08:32:37 +0000
committerAdrian Chadd <adrian@FreeBSD.org>2013-11-26 08:32:37 +0000
commit7689abaedcfb6009b374012fe345db47379c4f5e (patch)
tree34a082cf1e1eb7f424cc1b084d7f4dada758f4e7 /sys/compat/freebsd32/freebsd32_misc.c
parentce674298485fde88bf567361063dd14c2972f13e (diff)
downloadsrc-7689abaedcfb6009b374012fe345db47379c4f5e.tar.gz
src-7689abaedcfb6009b374012fe345db47379c4f5e.zip
Fix the compat32 sendfile() to be in line with my recent changes.
Reminded by: kib
Notes
Notes: svn path=/head/; revision=258621
Diffstat (limited to 'sys/compat/freebsd32/freebsd32_misc.c')
-rw-r--r--sys/compat/freebsd32/freebsd32_misc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c
index deb03f3ef586..9a5dd4365c2d 100644
--- a/sys/compat/freebsd32/freebsd32_misc.c
+++ b/sys/compat/freebsd32/freebsd32_misc.c
@@ -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)