aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/sys_i386_32.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/sys_i386_32.c')
-rw-r--r--arch/x86/kernel/sys_i386_32.c85
1 files changed, 0 insertions, 85 deletions
diff --git a/arch/x86/kernel/sys_i386_32.c b/arch/x86/kernel/sys_i386_32.c
index 7955e90c8341..8b5c348fdcf2 100644
--- a/arch/x86/kernel/sys_i386_32.c
+++ b/arch/x86/kernel/sys_i386_32.c
@@ -25,91 +25,6 @@
25#include <asm/syscalls.h> 25#include <asm/syscalls.h>
26 26
27/* 27/*
28 * sys_ipc() is the de-multiplexer for the SysV IPC calls..
29 *
30 * This is really horribly ugly.
31 */
32asmlinkage int sys_ipc(uint call, int first, int second,
33 int third, void __user *ptr, long fifth)
34{
35 int version, ret;
36
37 version = call >> 16; /* hack for backward compatibility */
38 call &= 0xffff;
39
40 switch (call) {
41 case SEMOP:
42 return sys_semtimedop(first, (struct sembuf __user *)ptr, second, NULL);
43 case SEMTIMEDOP:
44 return sys_semtimedop(first, (struct sembuf __user *)ptr, second,
45 (const struct timespec __user *)fifth);
46
47 case SEMGET:
48 return sys_semget(first, second, third);
49 case SEMCTL: {
50 union semun fourth;
51 if (!ptr)
52 return -EINVAL;
53 if (get_user(fourth.__pad, (void __user * __user *) ptr))
54 return -EFAULT;
55 return sys_semctl(first, second, third, fourth);
56 }
57
58 case MSGSND:
59 return sys_msgsnd(first, (struct msgbuf __user *) ptr,
60 second, third);
61 case MSGRCV:
62 switch (version) {
63 case 0: {
64 struct ipc_kludge tmp;
65 if (!ptr)
66 return -EINVAL;
67
68 if (copy_from_user(&tmp,
69 (struct ipc_kludge __user *) ptr,
70 sizeof(tmp)))
71 return -EFAULT;
72 return sys_msgrcv(first, tmp.msgp, second,
73 tmp.msgtyp, third);
74 }
75 default:
76 return sys_msgrcv(first,
77 (struct msgbuf __user *) ptr,
78 second, fifth, third);
79 }
80 case MSGGET:
81 return sys_msgget((key_t) first, second);
82 case MSGCTL:
83 return sys_msgctl(first, second, (struct msqid_ds __user *) ptr);
84
85 case SHMAT:
86 switch (version) {
87 default: {
88 ulong raddr;
89 ret = do_shmat(first, (char __user *) ptr, second, &raddr);
90 if (ret)
91 return ret;
92 return put_user(raddr, (ulong __user *) third);
93 }
94 case 1: /* iBCS2 emulator entry point */
95 if (!segment_eq(get_fs(), get_ds()))
96 return -EINVAL;
97 /* The "(ulong *) third" is valid _only_ because of the kernel segment thing */
98 return do_shmat(first, (char __user *) ptr, second, (ulong *) third);
99 }
100 case SHMDT:
101 return sys_shmdt((char __user *)ptr);
102 case SHMGET:
103 return sys_shmget(first, second, third);
104 case SHMCTL:
105 return sys_shmctl(first, second,
106 (struct shmid_ds __user *) ptr);
107 default:
108 return -ENOSYS;
109 }
110}
111
112/*
113 * Old cruft 28 * Old cruft
114 */ 29 */
115asmlinkage int sys_uname(struct old_utsname __user *name) 30asmlinkage int sys_uname(struct old_utsname __user *name)