summaryrefslogtreecommitdiffstats
path: root/sys/powerpc
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2007-07-31 06:23:26 +0000
committermarcel <marcel@FreeBSD.org>2007-07-31 06:23:26 +0000
commit4f54c1e2510fa11a31bd09af2b72ed8650d1cd1c (patch)
treea156573f6440df4fedf787810839bf875baf6e96 /sys/powerpc
parent5bbfc2d7829c0b94e802bccbdf9a2c5eb16c18b2 (diff)
downloadFreeBSD-src-4f54c1e2510fa11a31bd09af2b72ed8650d1cd1c.zip
FreeBSD-src-4f54c1e2510fa11a31bd09af2b72ed8650d1cd1c.tar.gz
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)
Diffstat (limited to 'sys/powerpc')
-rw-r--r--sys/powerpc/aim/trap.c4
-rw-r--r--sys/powerpc/powerpc/trap.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/powerpc/aim/trap.c b/sys/powerpc/aim/trap.c
index 1f25b26..2cae6a3 100644
--- a/sys/powerpc/aim/trap.c
+++ b/sys/powerpc/aim/trap.c
@@ -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
*/
diff --git a/sys/powerpc/powerpc/trap.c b/sys/powerpc/powerpc/trap.c
index 1f25b26..2cae6a3 100644
--- a/sys/powerpc/powerpc/trap.c
+++ b/sys/powerpc/powerpc/trap.c
@@ -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
*/
OpenPOWER on IntegriCloud