slightly better syscall diagnostics.

This commit is contained in:
deraadt 1993-10-27 17:29:31 +00:00
parent 2d1f5986f3
commit 4d451a6072
1 changed files with 5 additions and 2 deletions

View File

@ -44,7 +44,7 @@
* @(#)trap.c 8.1 (Berkeley) 6/16/93 * @(#)trap.c 8.1 (Berkeley) 6/16/93
* *
* from: Header: trap.c,v 1.34 93/05/28 04:34:50 torek Exp * from: Header: trap.c,v 1.34 93/05/28 04:34:50 torek Exp
* $Id: trap.c,v 1.3 1993/10/11 10:53:28 deraadt Exp $ * $Id: trap.c,v 1.4 1993/10/27 17:29:31 deraadt Exp $
*/ */
#include <sys/param.h> #include <sys/param.h>
@ -693,7 +693,7 @@ syscall(code, tf, pc, suncompat)
sticks = p->p_sticks; sticks = p->p_sticks;
p->p_md.md_tf = tf; p->p_md.md_tf = tf;
#ifdef DEBUG_SCALL #ifdef DEBUG_SCALL
printf("sc[%d] %s%d(", p->p_pid, suncompat ? "sun" : "", code); printf("sc[%d] %s%d/X%x(", p->p_pid, suncompat ? "sun" : "", code, code);
#endif #endif
new = code & (SYSCALL_G7RFLAG | SYSCALL_G2RFLAG); new = code & (SYSCALL_G7RFLAG | SYSCALL_G2RFLAG);
code &= ~(SYSCALL_G7RFLAG | SYSCALL_G2RFLAG); code &= ~(SYSCALL_G7RFLAG | SYSCALL_G2RFLAG);
@ -799,6 +799,9 @@ printf(") = ");
error = EINVAL; error = EINVAL;
goto bad; goto bad;
} }
#ifdef DEBUG_SCALL
printf("[new]");
#endif
} else { } else {
/* old system call convention: clear C on success */ /* old system call convention: clear C on success */
tf->tf_psr &= ~PSR_C; /* success */ tf->tf_psr &= ~PSR_C; /* success */