diff options
author | Roland McGrath <roland@redhat.com> | 2008-01-30 07:30:58 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:30:58 -0500 |
commit | 9e714bed644cb463489b9250774a4b0fb352cabc (patch) | |
tree | d6c4fb0105504e18cd46d78092a869a1bcedf4d7 /arch/x86/kernel | |
parent | 80976c0867b7537d77511492d3180b8093b0ba3d (diff) |
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>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/ptrace_32.c | 110 |
1 files changed, 55 insertions, 55 deletions
diff --git a/arch/x86/kernel/ptrace_32.c b/arch/x86/kernel/ptrace_32.c index f81e2f1827d4..5aca84ef26d5 100644 --- a/arch/x86/kernel/ptrace_32.c +++ b/arch/x86/kernel/ptrace_32.c | |||
@@ -51,37 +51,37 @@ static int putreg(struct task_struct *child, | |||
51 | struct pt_regs *regs = task_pt_regs(child); | 51 | struct pt_regs *regs = task_pt_regs(child); |
52 | regno >>= 2; | 52 | regno >>= 2; |
53 | switch (regno) { | 53 | switch (regno) { |
54 | case GS: | 54 | case GS: |
55 | if (value && (value & 3) != 3) | 55 | if (value && (value & 3) != 3) |
56 | return -EIO; | 56 | return -EIO; |
57 | child->thread.gs = value; | 57 | child->thread.gs = value; |
58 | return 0; | 58 | return 0; |
59 | case DS: | 59 | case DS: |
60 | case ES: | 60 | case ES: |
61 | case FS: | 61 | case FS: |
62 | if (value && (value & 3) != 3) | 62 | if (value && (value & 3) != 3) |
63 | return -EIO; | 63 | return -EIO; |
64 | value &= 0xffff; | 64 | value &= 0xffff; |
65 | break; | 65 | break; |
66 | case SS: | 66 | case SS: |
67 | case CS: | 67 | case CS: |
68 | if ((value & 3) != 3) | 68 | if ((value & 3) != 3) |
69 | return -EIO; | 69 | return -EIO; |
70 | value &= 0xffff; | 70 | value &= 0xffff; |
71 | break; | 71 | break; |
72 | case EFL: | 72 | case EFL: |
73 | value &= FLAG_MASK; | 73 | value &= FLAG_MASK; |
74 | /* | 74 | /* |
75 | * If the user value contains TF, mark that | 75 | * If the user value contains TF, mark that |
76 | * it was not "us" (the debugger) that set it. | 76 | * it was not "us" (the debugger) that set it. |
77 | * If not, make sure it stays set if we had. | 77 | * If not, make sure it stays set if we had. |
78 | */ | 78 | */ |
79 | if (value & X86_EFLAGS_TF) | 79 | if (value & X86_EFLAGS_TF) |
80 | clear_tsk_thread_flag(child, TIF_FORCED_TF); | 80 | clear_tsk_thread_flag(child, TIF_FORCED_TF); |
81 | else if (test_tsk_thread_flag(child, TIF_FORCED_TF)) | 81 | else if (test_tsk_thread_flag(child, TIF_FORCED_TF)) |
82 | value |= X86_EFLAGS_TF; | 82 | value |= X86_EFLAGS_TF; |
83 | value |= regs->flags & ~FLAG_MASK; | 83 | value |= regs->flags & ~FLAG_MASK; |
84 | break; | 84 | break; |
85 | } | 85 | } |
86 | *pt_regs_access(regs, regno) = value; | 86 | *pt_regs_access(regs, regno) = value; |
87 | return 0; | 87 | return 0; |
@@ -94,26 +94,26 @@ static unsigned long getreg(struct task_struct *child, unsigned long regno) | |||
94 | 94 | ||
95 | regno >>= 2; | 95 | regno >>= 2; |
96 | switch (regno) { | 96 | switch (regno) { |
97 | case EFL: | 97 | case EFL: |
98 | /* | 98 | /* |
99 | * If the debugger set TF, hide it from the readout. | 99 | * If the debugger set TF, hide it from the readout. |
100 | */ | 100 | */ |
101 | retval = regs->flags; | 101 | retval = regs->flags; |
102 | if (test_tsk_thread_flag(child, TIF_FORCED_TF)) | 102 | if (test_tsk_thread_flag(child, TIF_FORCED_TF)) |
103 | retval &= ~X86_EFLAGS_TF; | 103 | retval &= ~X86_EFLAGS_TF; |
104 | break; | 104 | break; |
105 | case GS: | 105 | case GS: |
106 | retval = child->thread.gs; | 106 | retval = child->thread.gs; |
107 | break; | 107 | break; |
108 | case DS: | 108 | case DS: |
109 | case ES: | 109 | case ES: |
110 | case FS: | 110 | case FS: |
111 | case SS: | 111 | case SS: |
112 | case CS: | 112 | case CS: |
113 | retval = 0xffff; | 113 | retval = 0xffff; |
114 | /* fall through */ | 114 | /* fall through */ |
115 | default: | 115 | default: |
116 | retval &= *pt_regs_access(regs, regno); | 116 | retval &= *pt_regs_access(regs, regno); |
117 | } | 117 | } |
118 | return retval; | 118 | return retval; |
119 | } | 119 | } |
@@ -190,7 +190,7 @@ static int ptrace_set_debugreg(struct task_struct *child, | |||
190 | * Make sure the single step bit is not set. | 190 | * Make sure the single step bit is not set. |
191 | */ | 191 | */ |
192 | void ptrace_disable(struct task_struct *child) | 192 | void ptrace_disable(struct task_struct *child) |
193 | { | 193 | { |
194 | user_disable_single_step(child); | 194 | user_disable_single_step(child); |
195 | clear_tsk_thread_flag(child, TIF_SYSCALL_EMU); | 195 | clear_tsk_thread_flag(child, TIF_SYSCALL_EMU); |
196 | } | 196 | } |
@@ -203,7 +203,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
203 | 203 | ||
204 | switch (request) { | 204 | switch (request) { |
205 | /* when I and D space are separate, these will need to be fixed. */ | 205 | /* when I and D space are separate, these will need to be fixed. */ |
206 | case PTRACE_PEEKTEXT: /* read word at location addr. */ | 206 | case PTRACE_PEEKTEXT: /* read word at location addr. */ |
207 | case PTRACE_PEEKDATA: | 207 | case PTRACE_PEEKDATA: |
208 | ret = generic_ptrace_peekdata(child, addr, data); | 208 | ret = generic_ptrace_peekdata(child, addr, data); |
209 | break; | 209 | break; |
@@ -213,7 +213,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
213 | unsigned long tmp; | 213 | unsigned long tmp; |
214 | 214 | ||
215 | ret = -EIO; | 215 | ret = -EIO; |
216 | if ((addr & 3) || addr < 0 || | 216 | if ((addr & 3) || addr < 0 || |
217 | addr > sizeof(struct user) - 3) | 217 | addr > sizeof(struct user) - 3) |
218 | break; | 218 | break; |
219 | 219 | ||
@@ -238,7 +238,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
238 | 238 | ||
239 | case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ | 239 | case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ |
240 | ret = -EIO; | 240 | ret = -EIO; |
241 | if ((addr & 3) || addr < 0 || | 241 | if ((addr & 3) || addr < 0 || |
242 | addr > sizeof(struct user) - 3) | 242 | addr > sizeof(struct user) - 3) |
243 | break; | 243 | break; |
244 | 244 | ||