Source-Changes-HG archive

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

[src/trunk]: src/sys/netnatm unifdef -U__OpenBSD__ -D__NetBSD__ -U__FreeBSD__...



details:   https://anonhg.NetBSD.org/src/rev/ffeabaec73d6
branches:  trunk
changeset: 763077:ffeabaec73d6
user:      dyoung <dyoung%NetBSD.org@localhost>
date:      Wed Mar 09 22:06:42 2011 +0000

description:
unifdef -U__OpenBSD__ -D__NetBSD__ -U__FreeBSD__ for readability.  No
functional change intended.

diffstat:

 sys/netnatm/natm.c |  68 +----------------------------------------------------
 1 files changed, 2 insertions(+), 66 deletions(-)

diffs (107 lines):

diff -r fe6a1b634d3d -r ffeabaec73d6 sys/netnatm/natm.c
--- a/sys/netnatm/natm.c        Wed Mar 09 22:04:52 2011 +0000
+++ b/sys/netnatm/natm.c        Wed Mar 09 22:06:42 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: natm.c,v 1.23 2011/02/01 19:40:24 chuck Exp $  */
+/*     $NetBSD: natm.c,v 1.24 2011/03/09 22:06:42 dyoung Exp $ */
 
 /*
  * Copyright (c) 1996 Charles D. Cranor and Washington University.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: natm.c,v 1.23 2011/02/01 19:40:24 chuck Exp $");
+__KERNEL_RCSID(0, "$NetBSD: natm.c,v 1.24 2011/03/09 22:06:42 dyoung Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -63,22 +63,12 @@
  * user requests
  */
 
-#if defined(__NetBSD__)
 int natm_usrreq(so, req, m, nam, control, l)
-#elif defined(__OpenBSD__)
-int natm_usrreq(so, req, m, nam, control, p)
-#elif defined(__FreeBSD__)
-int natm_usrreq(so, req, m, nam, control)
-#endif
 
 struct socket *so;
 int req;
 struct mbuf *m, *nam, *control;
-#if defined(__NetBSD__)
 struct lwp *l;
-#elif deifned(__OpenBSD__)
-struct proc *p;
-#endif
 
 {
   int error = 0, s, s2;
@@ -270,12 +260,7 @@
       memset(snatm, 0, sizeof(*snatm));
       nam->m_len = snatm->snatm_len = sizeof(*snatm);
       snatm->snatm_family = AF_NATM;
-#if defined(__NetBSD__) || defined(__OpenBSD__)
       memcpy(snatm->snatm_if, npcb->npcb_ifp->if_xname, sizeof(snatm->snatm_if));
-#elif defined(__FreeBSD__)
-      snprintf(snatm->snatm_if, sizeof(snatm->snatm_if), "%s%d",
-          npcb->npcb_ifp->if_name, npcb->npcb_ifp->if_unit);
-#endif
       snatm->snatm_vci = npcb->npcb_vci;
       snatm->snatm_vpi = npcb->npcb_vpi;
       break;
@@ -411,52 +396,3 @@
 
   goto next;
 }
-
-#if defined(__FreeBSD__)
-NETISR_SET(NETISR_NATM, natmintr);
-#endif
-
-
-#ifdef notyet
-/*
- * natm0_sysctl: not used, but here in case we want to add something
- * later...
- */
-
-int natm0_sysctl(name, namelen, oldp, oldlenp, newp, newlen)
-
-int *name;
-u_int namelen;
-void *oldp;
-size_t *oldlenp;
-void *newp;
-size_t newlen;
-
-{
-  /* All sysctl names at this level are terminal. */
-  if (namelen != 1)
-    return (ENOTDIR);
-  return (ENOPROTOOPT);
-}
-
-/*
- * natm5_sysctl: not used, but here in case we want to add something
- * later...
- */
-
-int natm5_sysctl(name, namelen, oldp, oldlenp, newp, newlen)
-
-int *name;
-u_int namelen;
-void *oldp;
-size_t *oldlenp;
-void *newp;
-size_t newlen;
-
-{
-  /* All sysctl names at this level are terminal. */
-  if (namelen != 1)
-    return (ENOTDIR);
-  return (ENOPROTOOPT);
-}
-#endif



Home | Main Index | Thread Index | Old Index