Subject: kern/2035: typo in /src/sys/dev/ccd.c
To: None <gnats-bugs@NetBSD.ORG>
From: Thorsten Frueauf <frueauf@ira.uka.de>
List: netbsd-bugs
Date: 02/06/1996 13:08:54
>Number:         2035
>Category:       kern
>Synopsis:       typo in /src/sys/dev/ccd.c
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Feb  6 08:05:16 1996
>Last-Modified:
>Originator:     Thorsten Frueauf
>Organization:
private
>Release:        <NetBSD-current source date> NetBSD current 05.02.1996
>Environment:
	
System: NetBSD di_frueauf 1.1A NetBSD 1.1A (Milano) #1: Sat Feb 3 17:17:07 GMT 1996 milano@di_frueauf:/home/milano/source/netbsd-src/sys/arch/amiga/compile/Milano amiga


>Description:
	
/src/sys/dev/ccd.c contains a simple typo which breaks the compilation of
a current kernel.

>How-To-Repeat:
	
Try to compile a kernel with current 05.02.1996 and watch:

cc  -O2 -Werror -msoft-float -I. -I../../../../arch -I../../../.. -DMILANO -DHP3
80 -DHP375 -DHP370 -DHP360 -DHP350 -DHP340 -DHP330 -DHP320 -DGENERIC -DDIAGNOSTI
C -DDEBUG -DDDB -DCOMPAT_HPUX -DCOMPAT_NOLABEL -DUSELEDS -DFPSP -DTCP_COMPAT_42
-DMROUTING -DGATEWAY -DINET -DMFS -DPROCFS -DFDESC -DKERNFS -DUNION -DNFSCLIENT
-DNFSSERVER -DCD9660 -DQUOTA -DFFS -DFIFO -DNKMEMCLUSTERS=1024 -DKTRACE -DSYSVMS
G -DSYSVSEM -DSYSVSHM -DCOMPAT_10 -DCOMPAT_09 -DCOMPAT_44 -DCOMPAT_43 -DDEVPAGER
 -DVNODEPAGER -DSWAPPAGER -D_KERNEL -Dmc68020 -Dhp300 -DFPCOPROC  -c ../../../..
/dev/ccd.c
../../../../dev/ccd.c: In function `ccdinit':
../../../../dev/ccd.c:372: `sc' undeclared (first use this function)
../../../../dev/ccd.c:372: (Each undeclared identifier is reported only once
../../../../dev/ccd.c:372: for each function it appears in.)
*** Error code 1

Stop.

>Fix:
	
Apply the following patch:

*** ccd.c-orig  Mon Feb  5 17:16:11 1996
--- ccd.c       Tue Feb  6 12:49:08 1996
***************
*** 369,375 ****
  #ifdef DEBUG
                        if (ccddebug & (CCDB_FOLLOW|CCDB_INIT))
                        printf("%s: mirroring requires interleave\n",
!                           sc->sc_xname);
  #endif
                        free(ci->ci_path, M_DEVBUF);
                        free(cs->sc_cinfo, M_DEVBUF);
--- 369,375 ----
  #ifdef DEBUG
                        if (ccddebug & (CCDB_FOLLOW|CCDB_INIT))
                        printf("%s: mirroring requires interleave\n",
!                           cs->sc_xname);
  #endif
                        free(ci->ci_path, M_DEVBUF);
                        free(cs->sc_cinfo, M_DEVBUF);
>Audit-Trail:
>Unformatted:
typo in /src/sys/dev/ccd.c