cvs commit: src/sys/dev/adlink adlink.c

Poul-Henning Kamp phk at phk.freebsd.dk
Tue Apr 8 12:54:05 PDT 2003


In message <074e01c2fe07$0205b5b0$52557f42 at errno.com>, "Sam Leffler" writes:
>>   Use #ifdef _KERNEL to let .c file double as .h file defining the ioctls.
>
>Yech!  If style(9) doesn't address this, I'd say it's time to add it.

I'd say it's not.

If you look at all the irrelevant crap we currently install in
/usr/include/sys and surrounding areas, I think you should rather
look at this as a way to avoid adding more junk to that pile.

The very few userland programs which will interact with a device
like the adlink, are not acting through a highly abstracted general
API, they are acting in close concert with the hardware through the
simplest and most targeted API possible.  There is even a good
probability that the kernel driver will be tweaked on a per
installation basis to match local circumstances.

In such cases it makes no sense to install a .h file in
/usr/include/mumble, it makes a lot more sense to exploit the fact
that we are an open-source project and point the two bits directly
at each other to avoid any sort of confusion as to which bits are
used and what level of generality is available.

Poul-Henning

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at 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.


More information about the cvs-all mailing list