From owner-freebsd-hackers Tue Mar 4 14:29:37 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 1261F37B401 for ; Tue, 4 Mar 2003 14:29:35 -0800 (PST) Received: from c001.snv.cp.net (h024.c001.snv.cp.net [209.228.32.139]) by mx1.FreeBSD.org (Postfix) with SMTP id 4441843FCB for ; Tue, 4 Mar 2003 14:29:34 -0800 (PST) (envelope-from kutulu@kutulu.org) Received: (cpmta 8812 invoked from network); 4 Mar 2003 14:29:33 -0800 Received: from 64.212.128.3 (HELO kutulu) by smtp.register-admin.com (209.228.32.139) with SMTP; 4 Mar 2003 14:29:33 -0800 X-Sent: 4 Mar 2003 22:29:33 GMT Message-ID: <013801c2e29d$87b0f7e0$29330f0a@lcapps.educate.com> From: "Mike Edenfield" To: Subject: D_KQFILTER & ltmdm. Date: Tue, 4 Mar 2003 17:29:32 -0500 Organization: KutuluWare Software Services 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 I'm working up a patch to the ltmdm to accomodate phk's recent changes to cdevsw. I've gotten the module to build and load, but I have two questions before I go ahead and submit a pr. 1) I simply removed D_KQFILTER from the list of flags. Based on phk's commit message I assumed the flag was simply not needed, and that removing it would not break anything. Is this assumption correct? Thus far the module is working (it loaded w/out a panic anyway) but I haven't tested it very much. 2) The patch, which I've included below, only works for -CURRENT with rev1.170 of conf.h. I wasn't sure how to get the preprocessor to differentiate between -CURRENT before and after this specific revision of a specific file. What is the correct way to do this? Or, alternatively, should the patch simply assume FreeBSD 5 is the latest -CURRENT and not worry about the imcompatibility w/ 5.0-RELEASE? Anyway, for those of you w/ ltmdm, the following patch, applied to sys/dev/ltmdm/ltmdmsio.c in the port's work directory, should get the module building and loading. --Mike --- work/sys/dev/ltmdm/ltmdmsio.c Tue Mar 4 17:23:10 2003 +++ ltmdmsio.c Tue Mar 4 17:18:01 2003 @@ -360,6 +360,9 @@ #endif static struct cdevsw sio_cdevsw = { + /* maj */ MAJOR_AUTO, + /* flags */ D_TTY, + /* name */ driver_name, /* open */ sioopen, /* close */ sioclose, /* read */ sioread, @@ -368,27 +371,8 @@ /* poll */ ttypoll, /* mmap */ nommap, /* strategy */ nostrategy, - /* name */ driver_name, -#ifdef MAJOR_AUTO - /* maj */ MAJOR_AUTO, -#else - /* maj */ CDEV_MAJOR, -#endif /* dump */ nodump, - /* psize */ nopsize, -#if __FreeBSD_version < 430000 - /* flags */ D_TTY, - /* bmaj */ -1, -#else -#if __FreeBSD_version < 500000 - /* flags */ D_TTY | D_KQFILTER, - /* bmaj */ -1, - /* kqfilter */ ttykqfilter, -#else /* __FreeBSD_version >= 500000 */ - /* flags */ D_TTY | D_KQFILTER, - /* kqfilter */ ttykqfilter, -#endif -#endif + /* kqfilter */ ttykqfilter }; static u_int com_events; /* input chars + weighted output completions */ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message