Date: Tue, 4 Mar 2003 17:29:32 -0500 From: "Mike Edenfield" <kutulu@kutulu.org> To: <freebsd-hackers@freebsd.org> Subject: D_KQFILTER & ltmdm. Message-ID: <013801c2e29d$87b0f7e0$29330f0a@lcapps.educate.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?013801c2e29d$87b0f7e0$29330f0a>