summaryrefslogtreecommitdiffstats
path: root/arch/ppc/kernel/syscalls.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-03-17 22:05:47 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-03-17 22:05:47 +0000
commit27cfca1ec98e91261b1a5355d10a8996464b63af (patch)
tree8e895a53e372fa682b4c0a585b9377d67ed70d0e /arch/ppc/kernel/syscalls.c
parent6a76fb7214c477ccf6582bd79c5b4ccc4f9c41b1 (diff)
Look Ma' what I found on my harddisk ...
o New faster syscalls for 2.1.x, too o Upgrade to 2.1.89. Don't try to run this. It's flaky as hell. But feel free to debug ...
Diffstat (limited to 'arch/ppc/kernel/syscalls.c')
-rw-r--r--arch/ppc/kernel/syscalls.c45
1 files changed, 43 insertions, 2 deletions
diff --git a/arch/ppc/kernel/syscalls.c b/arch/ppc/kernel/syscalls.c
index b7bac7a6a..91a8d0ccf 100644
--- a/arch/ppc/kernel/syscalls.c
+++ b/arch/ppc/kernel/syscalls.c
@@ -32,6 +32,8 @@
#include <linux/mman.h>
#include <linux/sys.h>
#include <linux/ipc.h>
+#include <linux/utsname.h>
+
#include <asm/uaccess.h>
#include <asm/ipc.h>
@@ -149,7 +151,7 @@ sys_ipc (uint call, int first, int second, int third, void *ptr, long fifth)
break;
}
case 1: /* iBCS2 emulator entry point */
- if (get_fs() != get_ds())
+ if (!segment_eq(get_fs(), get_ds()))
break;
ret = sys_shmat (first, (char *) ptr, second,
(ulong *) third);
@@ -206,7 +208,8 @@ asmlinkage unsigned long sys_mmap(unsigned long addr, size_t len,
if (fd >= NR_OPEN || !(file = current->files->fd[fd]))
goto out;
}
- flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
+
+ /*flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);*/
ret = do_mmap(file, addr, len, prot, flags, offset);
out:
unlock_kernel();
@@ -237,3 +240,41 @@ ppc_select(int n, fd_set *inp, fd_set *outp, fd_set *exp, struct timeval *tvp)
}
return sys_select(n, inp, outp, exp, tvp);
}
+
+asmlinkage int sys_pause(void)
+{
+ current->state = TASK_INTERRUPTIBLE;
+ schedule();
+ return -ERESTARTNOHAND;
+}
+
+asmlinkage int sys_uname(struct old_utsname * name)
+{
+ if (name && !copy_to_user(name, &system_utsname, sizeof (*name)))
+ return 0;
+ return -EFAULT;
+}
+
+asmlinkage int sys_olduname(struct oldold_utsname * name)
+{
+ int error;
+
+ if (!name)
+ return -EFAULT;
+ if (!access_ok(VERIFY_WRITE,name,sizeof(struct oldold_utsname)))
+ return -EFAULT;
+
+ error = __copy_to_user(&name->sysname,&system_utsname.sysname,__OLD_UTS_LEN);
+ error -= __put_user(0,name->sysname+__OLD_UTS_LEN);
+ error -= __copy_to_user(&name->nodename,&system_utsname.nodename,__OLD_UTS_LEN);
+ error -= __put_user(0,name->nodename+__OLD_UTS_LEN);
+ error -= __copy_to_user(&name->release,&system_utsname.release,__OLD_UTS_LEN);
+ error -= __put_user(0,name->release+__OLD_UTS_LEN);
+ error -= __copy_to_user(&name->version,&system_utsname.version,__OLD_UTS_LEN);
+ error -= __put_user(0,name->version+__OLD_UTS_LEN);
+ error -= __copy_to_user(&name->machine,&system_utsname.machine,__OLD_UTS_LEN);
+ error = __put_user(0,name->machine+__OLD_UTS_LEN);
+ error = error ? -EFAULT : 0;
+
+ return error;
+}