1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00

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 (rwatson)
This commit is contained in:
Marcel Moolenaar 2007-07-31 06:23:26 +00:00
parent 9e3fd30bac
commit 8875aa6621
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=171670
2 changed files with 4 additions and 4 deletions

View File

@ -433,8 +433,8 @@ syscall(struct trapframe *frame)
}
switch (error) {
case 0:
if ((frame->fixreg[0] == SYS___syscall) &&
(code != SYS_lseek)) {
if (frame->fixreg[0] == SYS___syscall &&
code != SYS_freebsd6_lseek && code != SYS_lseek) {
/*
* 64-bit return, 32-bit syscall. Fixup byte order
*/

View File

@ -433,8 +433,8 @@ syscall(struct trapframe *frame)
}
switch (error) {
case 0:
if ((frame->fixreg[0] == SYS___syscall) &&
(code != SYS_lseek)) {
if (frame->fixreg[0] == SYS___syscall &&
code != SYS_freebsd6_lseek && code != SYS_lseek) {
/*
* 64-bit return, 32-bit syscall. Fixup byte order
*/