revision 1.66
date: 2007/07/31 06:23:26;  author: marcel;  state: Exp;  lines: +2 -2
Fix backward compatibility of the "old" (i.e. FreeBSD6) lseek
syscall. It was broken when a new lseek syscall was introduced.
The problem is that we need to swap the 32-bit td_retval values
for the __syscall indirect syscall when the actual syscall has
a 32-bit return value. Hence, we need to exclude lseek(2). And
this means the "old" lseek(2) as well -- which we didn't.

Based on a patch from: grehan@

Approved by:	re (blanket)
This commit is contained in:
Olivier Houchard 2007-07-31 17:09:05 +00:00
parent 3e83e4a3f2
commit 6308183c5d

View File

@ -943,7 +943,7 @@ syscall(struct thread *td, trapframe_t *frame, u_int32_t insn)
case 0:
#ifdef __ARMEB__
if ((insn & 0x000fffff) == SYS___syscall &&
(code != SYS_lseek)) {
code != SYS_freebsd6_lseek && code != SYS_lseek) {
/*
* 64-bit return, 32-bit syscall. Fixup byte order
*/