From 2eeab93993bcb11d8e9cbf5c9cc203d0321299dc Mon Sep 17 00:00:00 2001 From: Garrett Wollman Date: Wed, 20 Sep 1995 20:48:29 +0000 Subject: [PATCH] Only print `bpf: foo0 attached' if bootverbose. --- sys/net/bpf.c | 37 ++++--------------------------------- 1 file changed, 4 insertions(+), 33 deletions(-) diff --git a/sys/net/bpf.c b/sys/net/bpf.c index c5d04848cc7..236ccfae64e 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -37,7 +37,7 @@ * * @(#)bpf.c 8.2 (Berkeley) 3/28/94 * - * $Id: bpf.c,v 1.10 1995/07/31 10:35:36 peter Exp $ + * $Id: bpf.c,v 1.11 1995/09/08 11:08:52 bde Exp $ */ #include "bpfilter.h" @@ -52,6 +52,7 @@ #include #include +#include /* for bootverbose */ #include #include #include @@ -1304,7 +1305,8 @@ bpfattach(driverp, ifp, dlt, hdrlen) for (i = 0; i < NBPFILTER; ++i) D_MARKFREE(&bpf_dtab[i]); - printf("bpf: %s%d attached\n", ifp->if_name, ifp->if_unit); + if (bootverbose) + printf("bpf: %s%d attached\n", ifp->if_name, ifp->if_unit); } #if BSD >= 199103 @@ -1341,35 +1343,4 @@ ifpromisc(ifp, pswitch) return ((*ifp->if_ioctl)(ifp, SIOCSIFFLAGS, (caddr_t)&ifr)); } #endif - -#if BSD < 199103 -/* - * Allocate some memory for bpf. This is temporary SunOS support, and - * is admittedly a hack. - * If resources unavaiable, return 0. - */ -static caddr_t -bpf_alloc(size, canwait) - register int size; - register int canwait; -{ - register struct mbuf *m; - - if ((unsigned)size > (MCLBYTES-8)) - return 0; - - MGET(m, canwait, MT_DATA); - if (m == 0) - return 0; - if ((unsigned)size > (MLEN-8)) { - MCLGET(m); - if (m->m_len != MCLBYTES) { - m_freem(m); - return 0; - } - } - *mtod(m, struct mbuf **) = m; - return mtod(m, caddr_t) + 8; -} -#endif #endif