Module Name:    src
Committed By:   rtr
Date:           Sun Jul  6 16:18:46 UTC 2014

Modified Files:
        src/sys/rump/net/lib/libsockin: sockin.c

Log Message:
* split PRU_SENSE functionality out of sockin_usrreq() and place into
  separate sockin_stat(struct socket *, struct stat *) function.
* change behavior of function to just return success (like pretty much
  every other implementation) instead of panic()ing due to lack of
  implementation.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/rump/net/lib/libsockin/sockin.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/net/lib/libsockin/sockin.c
diff -u src/sys/rump/net/lib/libsockin/sockin.c:1.42 src/sys/rump/net/lib/libsockin/sockin.c:1.43
--- src/sys/rump/net/lib/libsockin/sockin.c:1.42	Tue Jul  1 05:49:19 2014
+++ src/sys/rump/net/lib/libsockin/sockin.c	Sun Jul  6 16:18:46 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: sockin.c,v 1.42 2014/07/01 05:49:19 rtr Exp $	*/
+/*	$NetBSD: sockin.c,v 1.43 2014/07/06 16:18:46 rtr Exp $	*/
 
 /*
  * Copyright (c) 2008, 2009 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sockin.c,v 1.42 2014/07/01 05:49:19 rtr Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sockin.c,v 1.43 2014/07/06 16:18:46 rtr Exp $");
 
 #include <sys/param.h>
 #include <sys/condvar.h>
@@ -69,6 +69,7 @@ static void	sockin_init(void);
 static int	sockin_attach(struct socket *, int);
 static void	sockin_detach(struct socket *);
 static int	sockin_ioctl(struct socket *, u_long, void *, struct ifnet *);
+static int	sockin_stat(struct socket *, struct stat *);
 static int	sockin_usrreq(struct socket *, int, struct mbuf *,
 			      struct mbuf *, struct mbuf *, struct lwp *);
 static int	sockin_ctloutput(int op, struct socket *, struct sockopt *);
@@ -77,6 +78,7 @@ static const struct pr_usrreqs sockin_us
 	.pr_attach = sockin_attach,
 	.pr_detach = sockin_detach,
 	.pr_ioctl = sockin_ioctl,
+	.pr_stat = sockin_stat,
 	.pr_generic = sockin_usrreq,
 };
 
@@ -458,12 +460,19 @@ sockin_ioctl(struct socket *so, u_long c
 }
 
 static int
+sockin_stat(struct socket *so, struct stat *ub)
+{
+	return 0;
+}
+
+static int
 sockin_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam,
 	struct mbuf *control, struct lwp *l)
 {
 	int error = 0;
 
 	KASSERT(req != PRU_CONTROL);
+	KASSERT(req != PRU_SENSE);
 
 	switch (req) {
 	case PRU_ACCEPT:

Reply via email to