diff options
author | David Wu <davidwu@arcturusnetworks.com> | 2006-12-04 17:27:22 +1000 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-04 08:26:11 -0800 |
commit | 1bddcc50c27c8ca39a62a1d37e3928707be8f850 (patch) | |
tree | 1705567347dec8bce4ace6b0525595f7887724aa /arch/m68knommu | |
parent | 329237c12b94911dfad128e2588b0b7ae9c516e7 (diff) | |
download | linux-3.10-1bddcc50c27c8ca39a62a1d37e3928707be8f850.tar.gz linux-3.10-1bddcc50c27c8ca39a62a1d37e3928707be8f850.tar.bz2 linux-3.10-1bddcc50c27c8ca39a62a1d37e3928707be8f850.zip |
[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')
-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 c3494b8447d..3265b2d734d 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) asmlinkage int sys_ipc (uint call, int first, int second, int third, void *ptr, long fifth) { - int version; + int version, ret; version = call >> 16; /* hack for backward compatibility */ call &= 0xffff; @@ -190,6 +190,27 @@ asmlinkage int sys_ipc (uint call, int first, int second, default: return -EINVAL; } + if (call <= SHMCTL) + switch (call) { + case SHMAT: + switch (version) { + default: { + ulong raddr; + ret = do_shmat (first, ptr, second, &raddr); + if (ret) + return ret; + return put_user (raddr, (ulong __user *) third); + } + } + case SHMDT: + return sys_shmdt (ptr); + case SHMGET: + return sys_shmget (first, second, third); + case SHMCTL: + return sys_shmctl (first, second, ptr); + default: + return -ENOSYS; + } return -EINVAL; } |