PERFORCE change 100957 for review

John Baldwin jhb at FreeBSD.org
Sat Jul 8 03:26:09 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=100957

Change 100957 by jhb at jhb_mutex on 2006/07/08 03:25:09

	Drop the uioseg arg from kern_recvit() and hardcode it instead since
	it's always USER_UIOSPACE.

Affected files ...

.. //depot/projects/smpng/sys/compat/freebsd32/freebsd32_misc.c#40 edit
.. //depot/projects/smpng/sys/compat/svr4/svr4_stream.c#33 edit
.. //depot/projects/smpng/sys/kern/uipc_syscalls.c#85 edit
.. //depot/projects/smpng/sys/sys/syscallsubr.h#44 edit

Differences ...

==== //depot/projects/smpng/sys/compat/freebsd32/freebsd32_misc.c#40 (text+ko) ====

@@ -1009,8 +1009,7 @@
 	msg.msg_iov = iov;
 
 	controlp = (msg.msg_control != NULL) ?  &control : NULL;
-	error = kern_recvit(td, uap->s, &msg, UIO_USERSPACE,
-	    UIO_USERSPACE, controlp);
+	error = kern_recvit(td, uap->s, &msg, UIO_USERSPACE, controlp);
 	if (error == 0) {
 		msg.msg_iov = uiov;
 		
@@ -1150,8 +1149,7 @@
 	aiov.iov_len = uap->len;
 	msg.msg_control = NULL;
 	msg.msg_flags = uap->flags;
-	error = kern_recvit(td, uap->s, &msg, UIO_USERSPACE,
-	    UIO_USERSPACE, NULL);
+	error = kern_recvit(td, uap->s, &msg, UIO_USERSPACE, NULL);
 	if (error == 0 && uap->fromlenaddr)
 		error = copyout(&msg.msg_namelen, PTRIN(uap->fromlenaddr),
 		    sizeof (msg.msg_namelen));

==== //depot/projects/smpng/sys/compat/svr4/svr4_stream.c#33 (text+ko) ====

@@ -1859,8 +1859,7 @@
 		aiov.iov_len = dat.maxlen;
 		msg.msg_flags = 0;
 
-		error = kern_recvit(td, uap->fd, &msg, UIO_USERSPACE,
-		    UIO_SYSSPACE, NULL);
+		error = kern_recvit(td, uap->fd, &msg, UIO_SYSSPACE, NULL);
 
 		if (error) {
 			DPRINTF(("getmsg: recvit failed %d\n", error));

==== //depot/projects/smpng/sys/kern/uipc_syscalls.c#85 (text+ko) ====

@@ -952,11 +952,11 @@
 }
 
 int
-kern_recvit(td, s, mp, uioseg, fromseg, controlp)
+kern_recvit(td, s, mp, fromseg, controlp)
 	struct thread *td;
 	int s;
 	struct msghdr *mp;
-	enum uio_seg uioseg, fromseg;
+	enum uio_seg fromseg;
 	struct mbuf **controlp;
 {
 	struct uio auio;
@@ -997,7 +997,7 @@
 
 	auio.uio_iov = mp->msg_iov;
 	auio.uio_iovcnt = mp->msg_iovlen;
-	auio.uio_segflg = uioseg;
+	auio.uio_segflg = UIO_USERSPACE;
 	auio.uio_rw = UIO_READ;
 	auio.uio_td = td;
 	auio.uio_offset = 0;			/* XXX */
@@ -1124,7 +1124,7 @@
 {
 	int error;
 
-	error = kern_recvit(td, s, mp, UIO_USERSPACE, UIO_USERSPACE, NULL);
+	error = kern_recvit(td, s, mp, UIO_USERSPACE, NULL);
 	if (error)
 		return (error);
 	if (namelenp) {

==== //depot/projects/smpng/sys/sys/syscallsubr.h#44 (text+ko) ====

@@ -126,7 +126,7 @@
 	    char *buf, enum uio_seg bufseg, int count);
 int	kern_readv(struct thread *td, int fd, struct uio *auio);
 int	kern_recvit(struct thread *td, int s, struct msghdr *mp,
-	    enum uio_seg uioseg, enum uio_seg fromseg, struct mbuf **controlp);
+	    enum uio_seg fromseg, struct mbuf **controlp);
 int	kern_rename(struct thread *td, char *from, char *to,
 	    enum uio_seg pathseg);
 int	kern_rmdir(struct thread *td, char *path, enum uio_seg pathseg);


More information about the p4-projects mailing list