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 [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message