Date: Mon, 11 Aug 2008 10:55:08 +0200 From: Ed Schouten <ed@80386.nl> To: Remko Lodder <remko@FreeBSD.org> Cc: freebsd-bugs@FreeBSD.org Subject: Re: misc/126435: [patch] /usr/share/examples/drivers/make_pseudo_driver.sh fails to compile. Message-ID: <20080811085508.GT99951@hoeg.nl> In-Reply-To: <200808110650.m7B6ooZP096103@freefall.freebsd.org> References: <200808110650.m7B6ooZP096103@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--uhZknmokaVn544Hw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Remko :-) * Remko Lodder <remko@FreeBSD.org> 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 <<DONE %%% --=20 Ed Schouten <ed@80386.nl> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080811085508.GT99951>