From owner-freebsd-hackers Tue Mar 4 18:49:28 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3DB4237B401 for ; Tue, 4 Mar 2003 18:49:27 -0800 (PST) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6E49843FA3 for ; Tue, 4 Mar 2003 18:49:26 -0800 (PST) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.8/8.12.3) with ESMTP id h252nPA7025007; Tue, 4 Mar 2003 19:49:25 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 04 Mar 2003 19:49:17 -0700 (MST) Message-Id: <20030304.194917.100118237.imp@bsdimp.com> To: kutulu@kutulu.org Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: D_KQFILTER & ltmdm: Patch for review? From: "M. Warner Losh" In-Reply-To: <01be01c2e2b6$30742b00$29330f0a@lcapps.educate.com> References: <01be01c2e2b6$30742b00$29330f0a@lcapps.educate.com> X-Mailer: Mew version 2.1 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message: <01be01c2e2b6$30742b00$29330f0a@lcapps.educate.com> "Mike Edenfield" writes: : From: "Poul-Henning Kamp" : Sent: Tuesday, March 04, 2003 5:39 PM : : > But your patch is wrong. Please format the initialization like : > you see in all the other device drivers: : : I now see what you meant about the formatting. It was the whole reason to : reorder the fields, sorry I missed that. I also removed the redundant : initializations. : : Do you (well, does anyone) have a moment to eyeball this patch before I send : it off to the maintainer? : : Thanks again, : : --Mike : : --- sys/dev/ltmdm/ltmdmsio.c.orig Tue Mar 4 19:49:57 2003 : +++ sys/dev/ltmdm/ltmdmsio.c Tue Mar 4 20:17:16 2003 : @@ -360,6 +360,18 @@ : #endif : : static struct cdevsw sio_cdevsw = { : +#if __FreeBSD_version >= 500104 /* >= 20030303 */ This syntax works even for old versions of FreeBSD. You can make it safe by including all the noFoo functions. phk got rid of them because it is safe in >= 500104 to do that. Since you want to run on multiple versions, it would be better/safer to do that. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message