From owner-freebsd-hackers Tue Mar 4 19:33: 8 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 EBCEA37B401 for ; Tue, 4 Mar 2003 19:33:05 -0800 (PST) Received: from c001.snv.cp.net (h007.c001.snv.cp.net [209.228.32.121]) by mx1.FreeBSD.org (Postfix) with SMTP id 02BCB43FAF for ; Tue, 4 Mar 2003 19:33:05 -0800 (PST) (envelope-from kutulu@kutulu.org) Received: (cpmta 5000 invoked from network); 4 Mar 2003 19:33:04 -0800 Received: from 68.32.161.3 (HELO KutuluWare) by smtp.register-admin.com (209.228.32.121) with SMTP; 4 Mar 2003 19:33:04 -0800 X-Sent: 5 Mar 2003 03:33:04 GMT Message-ID: <002d01c2e2c7$a96b0e50$0245a8c0@KutuluWare> From: "Michael Edenfield" To: "M. Warner Losh" Cc: References: <01be01c2e2b6$30742b00$29330f0a@lcapps.educate.com> <20030304.194917.100118237.imp@bsdimp.com> Subject: Re: D_KQFILTER & ltmdm: Patch for review? Date: Tue, 4 Mar 2003 22:31:07 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 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 ----- Original Message ----- From: "M. Warner Losh" To: Cc: Sent: Tuesday, March 04, 2003 9:49 PM Subject: Re: D_KQFILTER & ltmdm: Patch for review? > 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. Alright, I did all that. I also eliminated some duplicated code by breaking the conditions up into 4 seperate blocks instead of 4 nested blocks, but I'm not sure if that is correct from a style standpoint. The resulting file is a couple lines smaller and easier to read (for me anyway), but it's not the style of the original code. It also made the patch slightly larger. I didn't see anything in style(9) pointing either way, is this an issue? I finally broke down and put the patch online instead of pasting into the email every time: http://www.kutulu.org/ltmdm.patch (By the time I get this right the maintainer will probably have fixed it anyway :\ ) --Mike To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message