Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netnatm * #include <sys/kmem.h> for kmem_intr_free()



details:   https://anonhg.NetBSD.org/src/rev/8ee5fedc9403
branches:  trunk
changeset: 330370:8ee5fedc9403
user:      rtr <rtr%NetBSD.org@localhost>
date:      Sun Jul 06 15:49:14 2014 +0000

description:
* #include <sys/kmem.h> for kmem_intr_free()
* add missing variables used by natm_attach(), natm_ioctl()

diffstat:

 sys/netnatm/natm.c |  15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diffs (62 lines):

diff -r 986788c0525e -r 8ee5fedc9403 sys/netnatm/natm.c
--- a/sys/netnatm/natm.c        Sun Jul 06 15:47:36 2014 +0000
+++ b/sys/netnatm/natm.c        Sun Jul 06 15:49:14 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: natm.c,v 1.31 2014/07/06 15:09:38 rtr Exp $    */
+/*     $NetBSD: natm.c,v 1.32 2014/07/06 15:49:14 rtr Exp $    */
 
 /*
  * Copyright (c) 1996 Charles D. Cranor and Washington University.
@@ -30,9 +30,10 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: natm.c,v 1.31 2014/07/06 15:09:38 rtr Exp $");
+__KERNEL_RCSID(0, "$NetBSD: natm.c,v 1.32 2014/07/06 15:49:14 rtr Exp $");
 
 #include <sys/param.h>
+#include <sys/kmem.h>
 #include <sys/systm.h>
 #include <sys/kernel.h>
 #include <sys/domain.h>
@@ -60,6 +61,7 @@
 static int
 natm_attach(struct socket *so, int proto)
 {
+       int error = 0;
        struct natmpcb *npcb;
 
        KASSERT(so->so_pcb == NULL);
@@ -76,7 +78,7 @@
        npcb = npcb_alloc(true);
        npcb->npcb_socket = so;
        so->so_pcb = npcb;
-       return 0;
+       return error;
 }
 
 static void
@@ -98,10 +100,14 @@
 static int
 natm_ioctl(struct socket *so, u_long cmd, void *nam, struct ifnet *ifp)
 {
-  int error = 0;
+  int error = 0, s;
+  struct natmpcb *npcb;
+  struct atm_rawioctl ario;
 
   s = SPLSOFTNET();
 
+  npcb = (struct natmpcb *) so->so_pcb;
+
   /*
    * raw atm ioctl.   comes in as a SIOCRAWATM.   we convert it to
    * SIOCXRAWATM and pass it to the driver.
@@ -157,7 +163,6 @@
   struct sockaddr_natm *snatm;
   struct atm_pseudoioctl api;
   struct atm_pseudohdr *aph;
-  struct atm_rawioctl ario;
   struct ifnet *ifp;
   int proto = so->so_proto->pr_protocol;
 



Home | Main Index | Thread Index | Old Index