aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mn10300/kernel/sys_mn10300.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mn10300/kernel/sys_mn10300.c')
-rw-r--r--arch/mn10300/kernel/sys_mn10300.c106
1 files changed, 0 insertions, 106 deletions
diff --git a/arch/mn10300/kernel/sys_mn10300.c b/arch/mn10300/kernel/sys_mn10300.c
index 17cc6ce04e8..815f1355fad 100644
--- a/arch/mn10300/kernel/sys_mn10300.c
+++ b/arch/mn10300/kernel/sys_mn10300.c
@@ -31,109 +31,3 @@ asmlinkage long old_mmap(unsigned long addr, unsigned long len,
31 return -EINVAL; 31 return -EINVAL;
32 return sys_mmap_pgoff(addr, len, prot, flags, fd, offset >> PAGE_SHIFT); 32 return sys_mmap_pgoff(addr, len, prot, flags, fd, offset >> PAGE_SHIFT);
33} 33}
34
35struct sel_arg_struct {
36 unsigned long n;
37 fd_set *inp;
38 fd_set *outp;
39 fd_set *exp;
40 struct timeval *tvp;
41};
42
43asmlinkage int old_select(struct sel_arg_struct __user *arg)
44{
45 struct sel_arg_struct a;
46
47 if (copy_from_user(&a, arg, sizeof(a)))
48 return -EFAULT;
49 /* sys_select() does the appropriate kernel locking */
50 return sys_select(a.n, a.inp, a.outp, a.exp, a.tvp);
51}
52
53/*
54 * sys_ipc() is the de-multiplexer for the SysV IPC calls..
55 *
56 * This is really horribly ugly.
57 */
58asmlinkage long sys_ipc(uint call, int first, int second,
59 int third, void __user *ptr, long fifth)
60{
61 int version, ret;
62
63 version = call >> 16; /* hack for backward compatibility */
64 call &= 0xffff;
65
66 switch (call) {
67 case SEMOP:
68 return sys_semtimedop(first, (struct sembuf __user *)ptr,
69 second, NULL);
70 case SEMTIMEDOP:
71 return sys_semtimedop(first, (struct sembuf __user *)ptr,
72 second,
73 (const struct timespec __user *)fifth);
74 case SEMGET:
75 return sys_semget(first, second, third);
76 case SEMCTL: {
77 union semun fourth;
78 if (!ptr)
79 return -EINVAL;
80 if (get_user(fourth.__pad, (void __user * __user *) ptr))
81 return -EFAULT;
82 return sys_semctl(first, second, third, fourth);
83 }
84
85 case MSGSND:
86 return sys_msgsnd(first, (struct msgbuf __user *) ptr,
87 second, third);
88 case MSGRCV:
89 switch (version) {
90 case 0: {
91 struct ipc_kludge tmp;
92 if (!ptr)
93 return -EINVAL;
94
95 if (copy_from_user(&tmp,
96 (struct ipc_kludge __user *) ptr,
97 sizeof(tmp)))
98 return -EFAULT;
99 return sys_msgrcv(first, tmp.msgp, second,
100 tmp.msgtyp, third);
101 }
102 default:
103 return sys_msgrcv(first,
104 (struct msgbuf __user *) ptr,
105 second, fifth, third);
106 }
107 case MSGGET:
108 return sys_msgget((key_t) first, second);
109 case MSGCTL:
110 return sys_msgctl(first, second,
111 (struct msqid_ds __user *) ptr);
112
113 case SHMAT:
114 switch (version) {
115 default: {
116 ulong raddr;
117 ret = do_shmat(first, (char __user *) ptr, second,
118 &raddr);
119 if (ret)
120 return ret;
121 return put_user(raddr, (ulong *) third);
122 }
123 case 1: /* iBCS2 emulator entry point */
124 if (!segment_eq(get_fs(), get_ds()))
125 return -EINVAL;
126 return do_shmat(first, (char __user *) ptr, second,
127 (ulong *) third);
128 }
129 case SHMDT:
130 return sys_shmdt((char __user *)ptr);
131 case SHMGET:
132 return sys_shmget(first, second, third);
133 case SHMCTL:
134 return sys_shmctl(first, second,
135 (struct shmid_ds __user *) ptr);
136 default:
137 return -EINVAL;
138 }
139}