diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2005-05-01 11:59:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-01 11:59:12 -0400 |
commit | 7d87e14c236d6c4cab66d87cf0bc1e0f0375d308 (patch) | |
tree | 0c0826cdc102286b541e3e56b59c81752d34c90d /ipc/shm.c | |
parent | 434498d5323445b59167fd7aa5633b74ebbce901 (diff) |
[PATCH] consolidate sys_shmat
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'ipc/shm.c')
-rw-r--r-- | ipc/shm.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -28,6 +28,8 @@ | |||
28 | #include <linux/security.h> | 28 | #include <linux/security.h> |
29 | #include <linux/syscalls.h> | 29 | #include <linux/syscalls.h> |
30 | #include <linux/audit.h> | 30 | #include <linux/audit.h> |
31 | #include <linux/ptrace.h> | ||
32 | |||
31 | #include <asm/uaccess.h> | 33 | #include <asm/uaccess.h> |
32 | 34 | ||
33 | #include "util.h" | 35 | #include "util.h" |
@@ -771,6 +773,18 @@ out: | |||
771 | return err; | 773 | return err; |
772 | } | 774 | } |
773 | 775 | ||
776 | asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg) | ||
777 | { | ||
778 | unsigned long ret; | ||
779 | long err; | ||
780 | |||
781 | err = do_shmat(shmid, shmaddr, shmflg, &ret); | ||
782 | if (err) | ||
783 | return err; | ||
784 | force_successful_syscall_return(); | ||
785 | return (long)ret; | ||
786 | } | ||
787 | |||
774 | /* | 788 | /* |
775 | * detach and kill segment if marked destroyed. | 789 | * detach and kill segment if marked destroyed. |
776 | * The work is done in shm_close. | 790 | * The work is done in shm_close. |