From owner-freebsd-bugs@FreeBSD.ORG Mon Aug 11 08:55:10 2008 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55015106566B; Mon, 11 Aug 2008 08:55:10 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:610:652::211]) by mx1.freebsd.org (Postfix) with ESMTP id 13E628FC08; Mon, 11 Aug 2008 08:55:10 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id C56581CC63; Mon, 11 Aug 2008 10:55:08 +0200 (CEST) Date: Mon, 11 Aug 2008 10:55:08 +0200 From: Ed Schouten To: Remko Lodder Message-ID: <20080811085508.GT99951@hoeg.nl> References: <200808110650.m7B6ooZP096103@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uhZknmokaVn544Hw" Content-Disposition: inline In-Reply-To: <200808110650.m7B6ooZP096103@freefall.freebsd.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-bugs@FreeBSD.org Subject: Re: misc/126435: [patch] /usr/share/examples/drivers/make_pseudo_driver.sh fails to compile. X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2008 08:55:10 -0000 --uhZknmokaVn544Hw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Remko :-) * Remko Lodder wrote: > Ed, I believe that this could have b een related to your devminor work, > can you have a look at this? (Even if I am incorrect in the devminor > part? ;-)) I have to say I don't really like this script. The code it creates isn't fabulous, but that's no reason to leave it broken. There are two problems with the script: - SYSINIT() now requires a semicolon, which was introduced somewhere in June if I remember correctly (not by me). - The problem isn't really that `unit' is unitialized. The actual problem is `scp', which must not be initialized. The following patch fixed it for me. Now it's yours. ;-) %%% --- share/examples/drivers/make_pseudo_driver.sh +++ share/examples/drivers/make_pseudo_driver.sh @@ -344,7 +344,7 @@ ${1}_drvinit(void *unused) { int unit; - sc_p scp =3D sca[unit]; + sc_p scp; =20 for (unit =3D 0; unit < N${UPPER}; unit++) { /* @@ -362,7 +362,7 @@ } =20 SYSINIT(${1}dev, SI_SUB_DRIVERS, SI_ORDER_MIDDLE+CDEV_MAJOR, - ${1}_drvinit, NULL) + ${1}_drvinit, NULL); DONE =20 cat >${TOP}/sys/${1}io.h < WWW: http://80386.nl/ --uhZknmokaVn544Hw Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkif/mwACgkQ52SDGA2eCwWNggCggD53EJSM1on/uLphN6E8YfJt u58AnAxVcmQGBpx8Wp4Y8lrhN26N1AQR =nwev -----END PGP SIGNATURE----- --uhZknmokaVn544Hw--