diff options
Diffstat (limited to 'arch/m68knommu/kernel/sys_m68k.c')
-rw-r--r-- | arch/m68knommu/kernel/sys_m68k.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/arch/m68knommu/kernel/sys_m68k.c b/arch/m68knommu/kernel/sys_m68k.c index c3494b8447d1..3265b2d734db 100644 --- a/arch/m68knommu/kernel/sys_m68k.c +++ b/arch/m68knommu/kernel/sys_m68k.c | |||
@@ -137,7 +137,7 @@ asmlinkage int old_select(struct sel_arg_struct *arg) | |||
137 | asmlinkage int sys_ipc (uint call, int first, int second, | 137 | asmlinkage int sys_ipc (uint call, int first, int second, |
138 | int third, void *ptr, long fifth) | 138 | int third, void *ptr, long fifth) |
139 | { | 139 | { |
140 | int version; | 140 | int version, ret; |
141 | 141 | ||
142 | version = call >> 16; /* hack for backward compatibility */ | 142 | version = call >> 16; /* hack for backward compatibility */ |
143 | call &= 0xffff; | 143 | call &= 0xffff; |
@@ -190,6 +190,27 @@ asmlinkage int sys_ipc (uint call, int first, int second, | |||
190 | default: | 190 | default: |
191 | return -EINVAL; | 191 | return -EINVAL; |
192 | } | 192 | } |
193 | if (call <= SHMCTL) | ||
194 | switch (call) { | ||
195 | case SHMAT: | ||
196 | switch (version) { | ||
197 | default: { | ||
198 | ulong raddr; | ||
199 | ret = do_shmat (first, ptr, second, &raddr); | ||
200 | if (ret) | ||
201 | return ret; | ||
202 | return put_user (raddr, (ulong __user *) third); | ||
203 | } | ||
204 | } | ||
205 | case SHMDT: | ||
206 | return sys_shmdt (ptr); | ||
207 | case SHMGET: | ||
208 | return sys_shmget (first, second, third); | ||
209 | case SHMCTL: | ||
210 | return sys_shmctl (first, second, ptr); | ||
211 | default: | ||
212 | return -ENOSYS; | ||
213 | } | ||
193 | 214 | ||
194 | return -EINVAL; | 215 | return -EINVAL; |
195 | } | 216 | } |