2003-06-26 Roland McGrath <roland@redhat.com>
* syscall.c (get_scno) [S390 || S390X]: Fix old vs new mode detection. From Michael Holzheu <HOLZHEU@de.ibm.com>.
This commit is contained in:
parent
ee911635e7
commit
2f924cafae
19
syscall.c
19
syscall.c
@ -734,14 +734,6 @@ struct tcb *tcp;
|
||||
|
||||
#ifdef LINUX
|
||||
#if defined(S390) || defined(S390X)
|
||||
if (upeek(pid, PT_GPR2, &syscall_mode) < 0)
|
||||
return -1;
|
||||
if (syscall_mode != -ENOSYS) {
|
||||
/*
|
||||
* Since kernel version 2.5.44 the scno gets passed in gpr2.
|
||||
*/
|
||||
scno = syscall_mode;
|
||||
}
|
||||
if (tcp->flags & TCB_WAITEXECVE) {
|
||||
/*
|
||||
* When the execve system call completes successfully, the
|
||||
@ -761,7 +753,16 @@ struct tcb *tcp;
|
||||
tcp->flags &= ~TCB_WAITEXECVE;
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
|
||||
if (upeek(pid, PT_GPR2, &syscall_mode) < 0)
|
||||
return -1;
|
||||
|
||||
if (syscall_mode != -ENOSYS) {
|
||||
/*
|
||||
* Since kernel version 2.5.44 the scno gets passed in gpr2.
|
||||
*/
|
||||
scno = syscall_mode;
|
||||
} else {
|
||||
/*
|
||||
* Old style of "passing" the scno via the SVC instruction.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user