aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/include
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2007-10-16 04:27:08 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 12:43:06 -0400
commit8ca842c4b5cbc70b9180617e9f26b6ac9f40dbb9 (patch)
treefe3e4deeae82c7063a72ecb3fdcae47422d6de0e /arch/um/include
parent28078e8f9790be0854a54f06de822689ab571944 (diff)
uml: remove os_* usage from userspace files
This patch fixes some userspace files which were calling libc through the os_* wrappers. It turns out that there was only one user of os_new_tty_pgrp, so it can be deleted. There are also some style and whitespace fixes in here. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/include')
-rw-r--r--arch/um/include/mconsole.h13
-rw-r--r--arch/um/include/os.h1
-rw-r--r--arch/um/include/sysdep-i386/ptrace.h3
-rw-r--r--arch/um/include/sysdep-x86_64/ptrace.h152
4 files changed, 78 insertions, 91 deletions
diff --git a/arch/um/include/mconsole.h b/arch/um/include/mconsole.h
index a2c35fecd1f5..c139ae1d6826 100644
--- a/arch/um/include/mconsole.h
+++ b/arch/um/include/mconsole.h
@@ -1,6 +1,6 @@
1/* 1/*
2 * Copyright (C) 2001 Lennert Buytenhek (buytenh@gnu.org) 2 * Copyright (C) 2001 Lennert Buytenhek (buytenh@gnu.org)
3 * Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com) 3 * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
4 * Licensed under the GPL 4 * Licensed under the GPL
5 */ 5 */
6 6
@@ -96,14 +96,3 @@ extern void lock_notify(void);
96extern void unlock_notify(void); 96extern void unlock_notify(void);
97 97
98#endif 98#endif
99
100/*
101 * Overrides for Emacs so that we follow Linus's tabbing style.
102 * Emacs will notice this stuff at the end of the file and automatically
103 * adjust the settings for this buffer only. This must remain at the end
104 * of the file.
105 * ---------------------------------------------------------------------------
106 * Local variables:
107 * c-file-style: "linux"
108 * End:
109 */
diff --git a/arch/um/include/os.h b/arch/um/include/os.h
index c704851d68b7..76048ba10875 100644
--- a/arch/um/include/os.h
+++ b/arch/um/include/os.h
@@ -132,7 +132,6 @@ extern void os_print_error(int error, const char* str);
132extern int os_get_exec_close(int fd, int *close_on_exec); 132extern int os_get_exec_close(int fd, int *close_on_exec);
133extern int os_set_exec_close(int fd, int close_on_exec); 133extern int os_set_exec_close(int fd, int close_on_exec);
134extern int os_ioctl_generic(int fd, unsigned int cmd, unsigned long arg); 134extern int os_ioctl_generic(int fd, unsigned int cmd, unsigned long arg);
135extern int os_new_tty_pgrp(int fd, int pid);
136extern int os_get_ifname(int fd, char *namebuf); 135extern int os_get_ifname(int fd, char *namebuf);
137extern int os_set_slip(int fd); 136extern int os_set_slip(int fd);
138extern int os_set_owner(int fd, int pid); 137extern int os_set_owner(int fd, int pid);
diff --git a/arch/um/include/sysdep-i386/ptrace.h b/arch/um/include/sysdep-i386/ptrace.h
index c0019d92fc73..edb9393283b5 100644
--- a/arch/um/include/sysdep-i386/ptrace.h
+++ b/arch/um/include/sysdep-i386/ptrace.h
@@ -1,4 +1,4 @@
1/* 1/*
2 * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) 2 * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
@@ -130,7 +130,6 @@ struct syscall_args {
130 } \ 130 } \
131 val; \ 131 val; \
132 }) 132 })
133
134 133
135#define UPT_SET(regs, reg, val) \ 134#define UPT_SET(regs, reg, val) \
136 do { \ 135 do { \
diff --git a/arch/um/include/sysdep-x86_64/ptrace.h b/arch/um/include/sysdep-x86_64/ptrace.h
index ebc2fd5dc31c..2ae04480ac81 100644
--- a/arch/um/include/sysdep-x86_64/ptrace.h
+++ b/arch/um/include/sysdep-x86_64/ptrace.h
@@ -143,87 +143,87 @@ struct syscall_args {
143}; 143};
144 144
145#define SYSCALL_ARGS(r) ((struct syscall_args) \ 145#define SYSCALL_ARGS(r) ((struct syscall_args) \
146 { .args = { UPT_SYSCALL_ARG1(r), \ 146 { .args = { UPT_SYSCALL_ARG1(r), \
147 UPT_SYSCALL_ARG2(r), \ 147 UPT_SYSCALL_ARG2(r), \
148 UPT_SYSCALL_ARG3(r), \ 148 UPT_SYSCALL_ARG3(r), \
149 UPT_SYSCALL_ARG4(r), \ 149 UPT_SYSCALL_ARG4(r), \
150 UPT_SYSCALL_ARG5(r), \ 150 UPT_SYSCALL_ARG5(r), \
151 UPT_SYSCALL_ARG6(r) } } ) 151 UPT_SYSCALL_ARG6(r) } } )
152 152
153#define UPT_REG(regs, reg) \ 153#define UPT_REG(regs, reg) \
154 ({ unsigned long val; \ 154 ({ unsigned long val; \
155 switch(reg){ \ 155 switch(reg){ \
156 case R8: val = UPT_R8(regs); break; \ 156 case R8: val = UPT_R8(regs); break; \
157 case R9: val = UPT_R9(regs); break; \ 157 case R9: val = UPT_R9(regs); break; \
158 case R10: val = UPT_R10(regs); break; \ 158 case R10: val = UPT_R10(regs); break; \
159 case R11: val = UPT_R11(regs); break; \ 159 case R11: val = UPT_R11(regs); break; \
160 case R12: val = UPT_R12(regs); break; \ 160 case R12: val = UPT_R12(regs); break; \
161 case R13: val = UPT_R13(regs); break; \ 161 case R13: val = UPT_R13(regs); break; \
162 case R14: val = UPT_R14(regs); break; \ 162 case R14: val = UPT_R14(regs); break; \
163 case R15: val = UPT_R15(regs); break; \ 163 case R15: val = UPT_R15(regs); break; \
164 case RIP: val = UPT_IP(regs); break; \ 164 case RIP: val = UPT_IP(regs); break; \
165 case RSP: val = UPT_SP(regs); break; \ 165 case RSP: val = UPT_SP(regs); break; \
166 case RAX: val = UPT_RAX(regs); break; \ 166 case RAX: val = UPT_RAX(regs); break; \
167 case RBX: val = UPT_RBX(regs); break; \ 167 case RBX: val = UPT_RBX(regs); break; \
168 case RCX: val = UPT_RCX(regs); break; \ 168 case RCX: val = UPT_RCX(regs); break; \
169 case RDX: val = UPT_RDX(regs); break; \ 169 case RDX: val = UPT_RDX(regs); break; \
170 case RSI: val = UPT_RSI(regs); break; \ 170 case RSI: val = UPT_RSI(regs); break; \
171 case RDI: val = UPT_RDI(regs); break; \ 171 case RDI: val = UPT_RDI(regs); break; \
172 case RBP: val = UPT_RBP(regs); break; \ 172 case RBP: val = UPT_RBP(regs); break; \
173 case ORIG_RAX: val = UPT_ORIG_RAX(regs); break; \ 173 case ORIG_RAX: val = UPT_ORIG_RAX(regs); break; \
174 case CS: val = UPT_CS(regs); break; \ 174 case CS: val = UPT_CS(regs); break; \
175 case SS: val = UPT_SS(regs); break; \ 175 case SS: val = UPT_SS(regs); break; \
176 case FS_BASE: val = UPT_FS_BASE(regs); break; \ 176 case FS_BASE: val = UPT_FS_BASE(regs); break; \
177 case GS_BASE: val = UPT_GS_BASE(regs); break; \ 177 case GS_BASE: val = UPT_GS_BASE(regs); break; \
178 case DS: val = UPT_DS(regs); break; \ 178 case DS: val = UPT_DS(regs); break; \
179 case ES: val = UPT_ES(regs); break; \ 179 case ES: val = UPT_ES(regs); break; \
180 case FS : val = UPT_FS (regs); break; \ 180 case FS : val = UPT_FS (regs); break; \
181 case GS: val = UPT_GS(regs); break; \ 181 case GS: val = UPT_GS(regs); break; \
182 case EFLAGS: val = UPT_EFLAGS(regs); break; \ 182 case EFLAGS: val = UPT_EFLAGS(regs); break; \
183 default : \ 183 default : \
184 panic("Bad register in UPT_REG : %d\n", reg); \ 184 panic("Bad register in UPT_REG : %d\n", reg); \
185 val = -1; \ 185 val = -1; \
186 } \ 186 } \
187 val; \ 187 val; \
188 }) 188 })
189 189
190 190
191#define UPT_SET(regs, reg, val) \ 191#define UPT_SET(regs, reg, val) \
192 ({ unsigned long __upt_val = val; \ 192 ({ unsigned long __upt_val = val; \
193 switch(reg){ \ 193 switch(reg){ \
194 case R8: UPT_R8(regs) = __upt_val; break; \ 194 case R8: UPT_R8(regs) = __upt_val; break; \
195 case R9: UPT_R9(regs) = __upt_val; break; \ 195 case R9: UPT_R9(regs) = __upt_val; break; \
196 case R10: UPT_R10(regs) = __upt_val; break; \ 196 case R10: UPT_R10(regs) = __upt_val; break; \
197 case R11: UPT_R11(regs) = __upt_val; break; \ 197 case R11: UPT_R11(regs) = __upt_val; break; \
198 case R12: UPT_R12(regs) = __upt_val; break; \ 198 case R12: UPT_R12(regs) = __upt_val; break; \
199 case R13: UPT_R13(regs) = __upt_val; break; \ 199 case R13: UPT_R13(regs) = __upt_val; break; \
200 case R14: UPT_R14(regs) = __upt_val; break; \ 200 case R14: UPT_R14(regs) = __upt_val; break; \
201 case R15: UPT_R15(regs) = __upt_val; break; \ 201 case R15: UPT_R15(regs) = __upt_val; break; \
202 case RIP: UPT_IP(regs) = __upt_val; break; \ 202 case RIP: UPT_IP(regs) = __upt_val; break; \
203 case RSP: UPT_SP(regs) = __upt_val; break; \ 203 case RSP: UPT_SP(regs) = __upt_val; break; \
204 case RAX: UPT_RAX(regs) = __upt_val; break; \ 204 case RAX: UPT_RAX(regs) = __upt_val; break; \
205 case RBX: UPT_RBX(regs) = __upt_val; break; \ 205 case RBX: UPT_RBX(regs) = __upt_val; break; \
206 case RCX: UPT_RCX(regs) = __upt_val; break; \ 206 case RCX: UPT_RCX(regs) = __upt_val; break; \
207 case RDX: UPT_RDX(regs) = __upt_val; break; \ 207 case RDX: UPT_RDX(regs) = __upt_val; break; \
208 case RSI: UPT_RSI(regs) = __upt_val; break; \ 208 case RSI: UPT_RSI(regs) = __upt_val; break; \
209 case RDI: UPT_RDI(regs) = __upt_val; break; \ 209 case RDI: UPT_RDI(regs) = __upt_val; break; \
210 case RBP: UPT_RBP(regs) = __upt_val; break; \ 210 case RBP: UPT_RBP(regs) = __upt_val; break; \
211 case ORIG_RAX: UPT_ORIG_RAX(regs) = __upt_val; break; \ 211 case ORIG_RAX: UPT_ORIG_RAX(regs) = __upt_val; break; \
212 case CS: UPT_CS(regs) = __upt_val; break; \ 212 case CS: UPT_CS(regs) = __upt_val; break; \
213 case SS: UPT_SS(regs) = __upt_val; break; \ 213 case SS: UPT_SS(regs) = __upt_val; break; \
214 case FS_BASE: UPT_FS_BASE(regs) = __upt_val; break; \ 214 case FS_BASE: UPT_FS_BASE(regs) = __upt_val; break; \
215 case GS_BASE: UPT_GS_BASE(regs) = __upt_val; break; \ 215 case GS_BASE: UPT_GS_BASE(regs) = __upt_val; break; \
216 case DS: UPT_DS(regs) = __upt_val; break; \ 216 case DS: UPT_DS(regs) = __upt_val; break; \
217 case ES: UPT_ES(regs) = __upt_val; break; \ 217 case ES: UPT_ES(regs) = __upt_val; break; \
218 case FS: UPT_FS(regs) = __upt_val; break; \ 218 case FS: UPT_FS(regs) = __upt_val; break; \
219 case GS: UPT_GS(regs) = __upt_val; break; \ 219 case GS: UPT_GS(regs) = __upt_val; break; \
220 case EFLAGS: UPT_EFLAGS(regs) = __upt_val; break; \ 220 case EFLAGS: UPT_EFLAGS(regs) = __upt_val; break; \
221 default : \ 221 default : \
222 panic("Bad register in UPT_SET : %d\n", reg); \ 222 panic("Bad register in UPT_SET : %d\n", reg); \
223 break; \ 223 break; \
224 } \ 224 } \
225 __upt_val; \ 225 __upt_val; \
226 }) 226 })
227 227
228#define UPT_SET_SYSCALL_RETURN(r, res) \ 228#define UPT_SET_SYSCALL_RETURN(r, res) \
229 REGS_SET_SYSCALL_RETURN((r)->regs, (res)) 229 REGS_SET_SYSCALL_RETURN((r)->regs, (res))