aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2010-03-10 18:21:21 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-12 18:52:32 -0500
commit5cacdb4add1b1e50fe75edc50ebbb7bddd9cf5e7 (patch)
treebd6595bb8c5c7e20ad01ed7ef766d873e5d26db3 /arch/mips
parente28cbf22933d0c0ccaf3c4c27a1a263b41f73859 (diff)
Add generic sys_olduname()
Add generic implementations of the old and really old uname system calls. Note that sh only implements sys_olduname but not sys_oldolduname, but I'm not going to bother with another ifdef for that special case. m32r implemented an old uname but never wired it up, so kill it, too. Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Jeff Dike <jdike@addtoit.com> Cc: Hirokazu Takata <takata@linux-m32r.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: James Morris <jmorris@namei.org> Cc: Andreas Schwab <schwab@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/include/asm/unistd.h1
-rw-r--r--arch/mips/kernel/syscall.c42
2 files changed, 1 insertions, 42 deletions
diff --git a/arch/mips/include/asm/unistd.h b/arch/mips/include/asm/unistd.h
index 97fe472095f2..1b5a6648eb86 100644
--- a/arch/mips/include/asm/unistd.h
+++ b/arch/mips/include/asm/unistd.h
@@ -1014,6 +1014,7 @@
1014#define __ARCH_WANT_SYS_LLSEEK 1014#define __ARCH_WANT_SYS_LLSEEK
1015#define __ARCH_WANT_SYS_NICE 1015#define __ARCH_WANT_SYS_NICE
1016#define __ARCH_WANT_SYS_OLD_GETRLIMIT 1016#define __ARCH_WANT_SYS_OLD_GETRLIMIT
1017#define __ARCH_WANT_SYS_OLD_UNAME
1017#define __ARCH_WANT_SYS_OLDUMOUNT 1018#define __ARCH_WANT_SYS_OLDUMOUNT
1018#define __ARCH_WANT_SYS_SIGPENDING 1019#define __ARCH_WANT_SYS_SIGPENDING
1019#define __ARCH_WANT_SYS_SIGPROCMASK 1020#define __ARCH_WANT_SYS_SIGPROCMASK
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c
index 257bf0141775..e96b1c30c7aa 100644
--- a/arch/mips/kernel/syscall.c
+++ b/arch/mips/kernel/syscall.c
@@ -215,48 +215,6 @@ out:
215 return error; 215 return error;
216} 216}
217 217
218/*
219 * Compacrapability ...
220 */
221SYSCALL_DEFINE1(uname, struct old_utsname __user *, name)
222{
223 if (name && !copy_to_user(name, utsname(), sizeof (*name)))
224 return 0;
225 return -EFAULT;
226}
227
228/*
229 * Compacrapability ...
230 */
231SYSCALL_DEFINE1(olduname, struct oldold_utsname __user *, name)
232{
233 int error;
234
235 if (!name)
236 return -EFAULT;
237 if (!access_ok(VERIFY_WRITE, name, sizeof(struct oldold_utsname)))
238 return -EFAULT;
239
240 error = __copy_to_user(&name->sysname, &utsname()->sysname,
241 __OLD_UTS_LEN);
242 error -= __put_user(0, name->sysname + __OLD_UTS_LEN);
243 error -= __copy_to_user(&name->nodename, &utsname()->nodename,
244 __OLD_UTS_LEN);
245 error -= __put_user(0, name->nodename + __OLD_UTS_LEN);
246 error -= __copy_to_user(&name->release, &utsname()->release,
247 __OLD_UTS_LEN);
248 error -= __put_user(0, name->release + __OLD_UTS_LEN);
249 error -= __copy_to_user(&name->version, &utsname()->version,
250 __OLD_UTS_LEN);
251 error -= __put_user(0, name->version + __OLD_UTS_LEN);
252 error -= __copy_to_user(&name->machine, &utsname()->machine,
253 __OLD_UTS_LEN);
254 error = __put_user(0, name->machine + __OLD_UTS_LEN);
255 error = error ? -EFAULT : 0;
256
257 return error;
258}
259
260SYSCALL_DEFINE1(set_thread_area, unsigned long, addr) 218SYSCALL_DEFINE1(set_thread_area, unsigned long, addr)
261{ 219{
262 struct thread_info *ti = task_thread_info(current); 220 struct thread_info *ti = task_thread_info(current);