summaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-01-21 23:15:25 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2013-03-03 23:00:27 -0500
commit56e41d3c5aa84d679eebdb3cb8a70b03c5fbd6c3 (patch)
tree62ede9a6cc31ed46d78632b65c4a66485fd5d1ad /ipc
parentd5dc77bfeeab0b03a32e3db5e31e2f64605634ab (diff)
downloadblackbird-op-linux-56e41d3c5aa84d679eebdb3cb8a70b03c5fbd6c3.tar.gz
blackbird-op-linux-56e41d3c5aa84d679eebdb3cb8a70b03c5fbd6c3.zip
merge compat sys_ipc instances
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'ipc')
-rw-r--r--ipc/compat.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/ipc/compat.c b/ipc/compat.c
index 2547f29dcd1b..1da2e2eb9d70 100644
--- a/ipc/compat.c
+++ b/ipc/compat.c
@@ -368,6 +368,50 @@ long compat_sys_msgrcv(int first, int second, int msgtyp, int third,
return do_msgrcv(first, uptr, second, msgtyp, third,
compat_do_msg_fill);
}
+
+COMPAT_SYSCALL_DEFINE6(ipc, u32, call, int, first, int, second,
+ u32, third, compat_uptr_t, ptr, u32, fifth)
+{
+ int version;
+
+ version = call >> 16; /* hack for backward compatibility */
+ call &= 0xffff;
+
+ switch (call) {
+ case SEMOP:
+ /* struct sembuf is the same on 32 and 64bit :)) */
+ return sys_semtimedop(first, compat_ptr(ptr), second, NULL);
+ case SEMTIMEDOP:
+ return compat_sys_semtimedop(first, compat_ptr(ptr), second,
+ compat_ptr(fifth));
+ case SEMGET:
+ return sys_semget(first, second, third);
+ case SEMCTL:
+ return compat_sys_semctl(first, second, third, compat_ptr(ptr));
+
+ case MSGSND:
+ return compat_sys_msgsnd(first, second, third, compat_ptr(ptr));
+ case MSGRCV:
+ return compat_sys_msgrcv(first, second, fifth, third,
+ version, compat_ptr(ptr));
+ case MSGGET:
+ return sys_msgget(first, second);
+ case MSGCTL:
+ return compat_sys_msgctl(first, second, compat_ptr(ptr));
+
+ case SHMAT:
+ return compat_sys_shmat(first, second, third, version,
+ compat_ptr(ptr));
+ case SHMDT:
+ return sys_shmdt(compat_ptr(ptr));
+ case SHMGET:
+ return sys_shmget(first, (unsigned)second, third);
+ case SHMCTL:
+ return compat_sys_shmctl(first, second, compat_ptr(ptr));
+ }
+
+ return -ENOSYS;
+}
#else
long compat_sys_semctl(int semid, int semnum, int cmd, int arg)
{
OpenPOWER on IntegriCloud