Skip to content

Commit

Permalink
MFi386: revision 206553
Browse files Browse the repository at this point in the history
  - Change printf() calls to uprintf() for sigreturn().
  - Normalize the messages to include both pid and thread name.
  • Loading branch information
nyan- committed Apr 29, 2010
1 parent 06a2ddb commit 294bb61
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions sys/pc98/pc98/machdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,8 @@ freebsd4_sigreturn(td, uap)
* one less debugger trap, so allowing it is fairly harmless.
*/
if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_eflags & ~PSL_RF)) {
printf("freebsd4_sigreturn: eflags = 0x%x\n", eflags);
uprintf("pid %d (%s): freebsd4_sigreturn eflags = 0x%x\n",
td->td_proc->p_pid, td->td_name, eflags);
return (EINVAL);
}

Expand All @@ -885,7 +886,8 @@ freebsd4_sigreturn(td, uap)
*/
cs = ucp->uc_mcontext.mc_cs;
if (!CS_SECURE(cs)) {
printf("freebsd4_sigreturn: cs = 0x%x\n", cs);
uprintf("pid %d (%s): freebsd4_sigreturn cs = 0x%x\n",
td->td_proc->p_pid, td->td_name, cs);
ksiginfo_init_trap(&ksi);
ksi.ksi_signo = SIGBUS;
ksi.ksi_code = BUS_OBJERR;
Expand Down Expand Up @@ -986,7 +988,8 @@ sigreturn(td, uap)
* one less debugger trap, so allowing it is fairly harmless.
*/
if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_eflags & ~PSL_RF)) {
printf("sigreturn: eflags = 0x%x\n", eflags);
uprintf("pid %d (%s): sigreturn eflags = 0x%x\n",
td->td_proc->p_pid, td->td_name, eflags);
return (EINVAL);
}

Expand All @@ -997,7 +1000,8 @@ sigreturn(td, uap)
*/
cs = ucp->uc_mcontext.mc_cs;
if (!CS_SECURE(cs)) {
printf("sigreturn: cs = 0x%x\n", cs);
uprintf("pid %d (%s): sigreturn cs = 0x%x\n",
td->td_proc->p_pid, td->td_name, cs);
ksiginfo_init_trap(&ksi);
ksi.ksi_signo = SIGBUS;
ksi.ksi_code = BUS_OBJERR;
Expand Down

0 comments on commit 294bb61

Please sign in to comment.