diff options
author | David Wu <davidwu@arcturusnetworks.com> | 2006-12-04 02:27:22 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-04 11:26:11 -0500 |
commit | 1bddcc50c27c8ca39a62a1d37e3928707be8f850 (patch) | |
tree | 1705567347dec8bce4ace6b0525595f7887724aa /arch/m68knommu/kernel | |
parent | 329237c12b94911dfad128e2588b0b7ae9c516e7 (diff) |
[PATCH] m68knommu: add SHM support
It turns out SHMAT, SHMDT, SHMGET and SHMCTL support in sys_ipc() for
m68knommu in 2.6 kernel(uClinux-dist-20060803 release) is missing.
(copied from m68k sources, report by David Wu <davidwu@arcturusnetworks.com>)
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/m68knommu/kernel')
-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 | } |