patch-1.3.2 linux/ipc/msg.c

Next file: linux/ipc/sem.c
Previous file: linux/init/main.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.1/linux/ipc/msg.c linux/ipc/msg.c
@@ -36,7 +36,7 @@
 	return;
 }
 
-int sys_msgsnd (int msqid, struct msgbuf *msgp, int msgsz, int msgflg)
+asmlinkage int sys_msgsnd (int msqid, struct msgbuf *msgp, size_t msgsz, int msgflg)
 {
 	int id, err;
 	struct msqid_ds *msq;
@@ -44,7 +44,7 @@
 	struct msg *msgh;
 	long mtype;
 	
-	if (msgsz > MSGMAX || msgsz < 0 || msqid < 0)
+	if (msgsz > MSGMAX || (long) msgsz < 0 || msqid < 0)
 		return -EINVAL;
 	if (!msgp) 
 		return -EFAULT;
@@ -108,7 +108,7 @@
 	return msgsz;
 }
 
-int sys_msgrcv (int msqid, struct msgbuf *msgp, int msgsz, long msgtyp, 
+asmlinkage int sys_msgrcv (int msqid, struct msgbuf *msgp, size_t msgsz, long msgtyp, 
 		int msgflg)
 {
 	struct msqid_ds *msq;
@@ -117,7 +117,7 @@
 	struct msg *nmsg = NULL;
 	int id, err;
 
-	if (msqid < 0 || msgsz < 0)
+	if (msqid < 0 || (long) msgsz < 0)
 		return -EINVAL;
 	if (!msgp || !msgp->mtext)
 	    return -EFAULT;
@@ -267,7 +267,7 @@
 	return (unsigned int) msq->msg_perm.seq * MSGMNI + id;
 }
 
-int sys_msgget (key_t key, int msgflg)
+asmlinkage int sys_msgget (key_t key, int msgflg)
 {
 	int id;
 	struct msqid_ds *msq;
@@ -316,7 +316,7 @@
 	kfree(msq);
 }
 
-int sys_msgctl (int msqid, int cmd, struct msqid_ds *buf)
+asmlinkage int sys_msgctl (int msqid, int cmd, struct msqid_ds *buf)
 {
 	int id, err;
 	struct msqid_ds *msq;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this