Subject: kern/3571: patch to if_strip.c
To: None <gnats-bugs@gnats.netbsd.org>
From: Jonathan O'Brien <obrien@arkham.gossamer.com>
List: netbsd-bugs
Date: 05/03/1997 17:19:09
>Number: 3571
>Category: kern
>Synopsis: if_strip.c fails to compile
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people (Kernel Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat May 3 17:35:00 1997
>Last-Modified:
>Originator: Jonathan O'Brien
>Organization:
SFC
>Release: $NetBSD: if_strip.c,v 1.9 1997/03/27 20:36:18 thorpej Exp $
>Environment:
System: NetBSD arkham 1.2D NetBSD 1.2D (ARKHAM) #0: Fri May 2 23:54:40 PDT 1997 obrien@arkham:/usr/src/sys/arch/sparc/compile/ARKHAM sparc
>Description:
if_strip.c contains a couple of bogons that won't allow it to
compile.
>How-To-Repeat:
Compile a kernel with a config file that contains:
pseudo-device strip 1
>Fix:
Although I don't have one of these radio clocks (wish I did),
the following patch seems to make everything happy.
*** if_strip.c.orig Fri Mar 28 04:22:10 1997
--- if_strip.c Fri May 2 22:24:11 1997
***************
*** 381,387 ****
*/
sc->sc_xxx = (u_char *)malloc(MCLBYTES, M_MBUF, M_WAITOK);
if (sc->sc_xxx)
! sc->sc_ep = sc_xxx + SLBUFSIZE;
else {
printf("%s: can't allocate buffer\n",
sc->sc_if.if_xname);
--- 381,387 ----
*/
sc->sc_xxx = (u_char *)malloc(MCLBYTES, M_MBUF, M_WAITOK);
if (sc->sc_xxx)
! sc->sc_ep = sc->sc_xxx + SLBUFSIZE;
else {
printf("%s: can't allocate buffer\n",
sc->sc_if.if_xname);
***************
*** 1057,1062 ****
--- 1057,1063 ----
register int len;
{
register struct mbuf *m;
+ register u_char *p;
MGETHDR(m, M_DONTWAIT, MT_DATA);
if (m == NULL)
>Audit-Trail:
>Unformatted: