Date: Tue, 04 Mar 2003 23:39:42 +0100 From: "Poul-Henning Kamp" <phk@phk.freebsd.dk> To: "Mike Edenfield" <kutulu@kutulu.org> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: D_KQFILTER & ltmdm. Message-ID: <42651.1046817582@critter.freebsd.dk> In-Reply-To: Your message of "Tue, 04 Mar 2003 17:29:32 EST." <013801c2e29d$87b0f7e0$29330f0a@lcapps.educate.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <013801c2e29d$87b0f7e0$29330f0a@lcapps.educate.com>, "Mike Edenfield " writes: >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. correct. D_KQFILTER was added so that we wouldn't dereference the d_kqfilter pointer in case it was not there (ie: if the driver was binary and compiled before the d_kqfilter pointer was added to cdevsw). It's hacks like this we avoid now. >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? I have bumped __FreeBSD_version so you can test for this. But your patch is wrong. Please format the initialization like you see in all the other device drivers: static struct cdevsw sio_cdevsw = { .d_maj = MAJOR_AUTO, .d_flags = D_TTY, .d_open = sioopen etc etc -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. 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?42651.1046817582>