linux-cvs-patches
[Top] [All Lists]

CVS Update@linux-mips.org: linux

To: linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
From: ralf@linux-mips.org
Date: Tue, 05 Apr 2005 21:37:47 +0100
Reply-to: linux-mips@linux-mips.org
Sender: linux-cvs-patches-bounce@linux-mips.org
CVSROOT:        /home/cvs
Module name:    linux
Changes by:     ralf@ftp.linux-mips.org 05/04/05 21:37:42

Modified files:
        arch/mips/kernel: syscall.c 
        include/linux  : syscalls.h 

Log message:
        Convert the stupid 4-argument shmat(2) N64 syscall to the 32-bit variant
        for sanity and so it'll match what glibc already expects.

diff -urN linux/arch/mips/kernel/syscall.c linux/arch/mips/kernel/syscall.c
--- linux/arch/mips/kernel/syscall.c    2005/03/08 14:39:39     1.49
+++ linux/arch/mips/kernel/syscall.c    2005/04/05 20:37:42     1.50
@@ -379,17 +379,15 @@
 /*
  * Native ABI that is O32 or N64 version
  */
-asmlinkage long sys_shmat(int shmid, char __user *shmaddr,
-                          int shmflg, unsigned long *addr)
+asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg)
 {
-       unsigned long raddr;
-       int err;
+       unsigned long raddr, err;
 
        err = do_shmat(shmid, shmaddr, shmflg, &raddr);
        if (err)
                return err;
 
-       return put_user(raddr, addr);
+       return raddr;
 }
 
 /*
diff -urN linux/include/linux/syscalls.h linux/include/linux/syscalls.h
--- linux/include/linux/syscalls.h      2005/01/13 14:06:53     1.11
+++ linux/include/linux/syscalls.h      2005/04/05 20:37:42     1.12
@@ -456,8 +456,12 @@
 asmlinkage long sys_semtimedop(int semid, struct sembuf __user *sops,
                                unsigned nsops,
                                const struct timespec __user *timeout);
+#ifdef __mips__
+asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg);
+#else
 asmlinkage long sys_shmat(int shmid, char __user *shmaddr,
                                int shmflg, unsigned long __user *addr);
+#endif
 asmlinkage long sys_shmget(key_t key, size_t size, int flag);
 asmlinkage long sys_shmdt(char __user *shmaddr);
 asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf);

<Prev in Thread] Current Thread [Next in Thread>