x86: x86-32 ptrace whitespace

This canonicalizes the indentation in the getreg and putreg functions.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
Roland McGrath 2008-01-30 13:30:58 +01:00 committed by Ingo Molnar
parent 80976c0867
commit 9e714bed64

View file

@ -51,37 +51,37 @@ static int putreg(struct task_struct *child,
struct pt_regs *regs = task_pt_regs(child); struct pt_regs *regs = task_pt_regs(child);
regno >>= 2; regno >>= 2;
switch (regno) { switch (regno) {
case GS: case GS:
if (value && (value & 3) != 3) if (value && (value & 3) != 3)
return -EIO; return -EIO;
child->thread.gs = value; child->thread.gs = value;
return 0; return 0;
case DS: case DS:
case ES: case ES:
case FS: case FS:
if (value && (value & 3) != 3) if (value && (value & 3) != 3)
return -EIO; return -EIO;
value &= 0xffff; value &= 0xffff;
break; break;
case SS: case SS:
case CS: case CS:
if ((value & 3) != 3) if ((value & 3) != 3)
return -EIO; return -EIO;
value &= 0xffff; value &= 0xffff;
break; break;
case EFL: case EFL:
value &= FLAG_MASK; value &= FLAG_MASK;
/* /*
* If the user value contains TF, mark that * If the user value contains TF, mark that
* it was not "us" (the debugger) that set it. * it was not "us" (the debugger) that set it.
* If not, make sure it stays set if we had. * If not, make sure it stays set if we had.
*/ */
if (value & X86_EFLAGS_TF) if (value & X86_EFLAGS_TF)
clear_tsk_thread_flag(child, TIF_FORCED_TF); clear_tsk_thread_flag(child, TIF_FORCED_TF);
else if (test_tsk_thread_flag(child, TIF_FORCED_TF)) else if (test_tsk_thread_flag(child, TIF_FORCED_TF))
value |= X86_EFLAGS_TF; value |= X86_EFLAGS_TF;
value |= regs->flags & ~FLAG_MASK; value |= regs->flags & ~FLAG_MASK;
break; break;
} }
*pt_regs_access(regs, regno) = value; *pt_regs_access(regs, regno) = value;
return 0; return 0;
@ -94,26 +94,26 @@ static unsigned long getreg(struct task_struct *child, unsigned long regno)
regno >>= 2; regno >>= 2;
switch (regno) { switch (regno) {
case EFL: case EFL:
/* /*
* If the debugger set TF, hide it from the readout. * If the debugger set TF, hide it from the readout.
*/ */
retval = regs->flags; retval = regs->flags;
if (test_tsk_thread_flag(child, TIF_FORCED_TF)) if (test_tsk_thread_flag(child, TIF_FORCED_TF))
retval &= ~X86_EFLAGS_TF; retval &= ~X86_EFLAGS_TF;
break; break;
case GS: case GS:
retval = child->thread.gs; retval = child->thread.gs;
break; break;
case DS: case DS:
case ES: case ES:
case FS: case FS:
case SS: case SS:
case CS: case CS:
retval = 0xffff; retval = 0xffff;
/* fall through */ /* fall through */
default: default:
retval &= *pt_regs_access(regs, regno); retval &= *pt_regs_access(regs, regno);
} }
return retval; return retval;
} }
@ -190,7 +190,7 @@ static int ptrace_set_debugreg(struct task_struct *child,
* Make sure the single step bit is not set. * Make sure the single step bit is not set.
*/ */
void ptrace_disable(struct task_struct *child) void ptrace_disable(struct task_struct *child)
{ {
user_disable_single_step(child); user_disable_single_step(child);
clear_tsk_thread_flag(child, TIF_SYSCALL_EMU); clear_tsk_thread_flag(child, TIF_SYSCALL_EMU);
} }
@ -203,7 +203,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
switch (request) { switch (request) {
/* when I and D space are separate, these will need to be fixed. */ /* when I and D space are separate, these will need to be fixed. */
case PTRACE_PEEKTEXT: /* read word at location addr. */ case PTRACE_PEEKTEXT: /* read word at location addr. */
case PTRACE_PEEKDATA: case PTRACE_PEEKDATA:
ret = generic_ptrace_peekdata(child, addr, data); ret = generic_ptrace_peekdata(child, addr, data);
break; break;
@ -213,7 +213,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
unsigned long tmp; unsigned long tmp;
ret = -EIO; ret = -EIO;
if ((addr & 3) || addr < 0 || if ((addr & 3) || addr < 0 ||
addr > sizeof(struct user) - 3) addr > sizeof(struct user) - 3)
break; break;
@ -238,7 +238,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ case PTRACE_POKEUSR: /* write the word at location addr in the USER area */
ret = -EIO; ret = -EIO;
if ((addr & 3) || addr < 0 || if ((addr & 3) || addr < 0 ||
addr > sizeof(struct user) - 3) addr > sizeof(struct user) - 3)
break; break;