cvs commit: src/share/examples/drivers make_device_driver.sh
yar at comp.chem.msu.su
Fri Aug 11 00:16:41 UTC 2006
On Thu, Aug 10, 2006 at 07:20:49PM +1000, Peter Jeremy wrote:
> On Thu, 2006-Aug-10 10:33:12 +0400, Yar Tikhiy wrote:
> >...and if you manage to make the driver do some real job so that
> >people start using it in production, it will have nearly zero chance
> >to fall into oblivion; it will remain in a very good shape instead.
> We already have have hundreds of drivers that meet this description.
You seem to have left out the other part of the description. The
driver source should also be instructive; that is, well-written,
thoroughly commented, and using the best current practices. To
scrape up the hundreds, we would have to include the drivers with
K&R style source in the list. :-)
> The problem with having a real driver is that someone who wants to use
> it as a skeleton has to first separate the "boilerplate" from the
> functional parts. OTOH, having a well-commented and working driver
> can be very useful when trying to understand how to get from the
> boilerplate to a real driver.
Well, an existing driver (or several drivers of different complexity)
could be adapted this way; and, according to my own experience in
jobs as dirty as this one, it can be enough fun to you when you
learn something interesting from it, too. OTOH, it's tedious to
do in case you can recite the driver source, smiling when it comes
to a particularly exquisite hack. Therefore we shouldn't expect
driver maintainers or active driver developers to do the job: FreeBSD
means, first of all, fun. At the same time, not-so-experienced
developers could do it with pleasure, as well as for the benefit
of both theirselves and the community. Note that "developers"
doesn't mean "committers" at once, and everyone can help by submitting
respective patches--preferably a patch per a whole driver, not per
a comment added. :-)
> Addressing the latter point: It would be useful if (eg) the README
> file gave a few examples of drivers that made good examples for
^^^^^^^^^^^ references to?
> basing other drivers on. I know people have made various suggestions
> in mailing lists over the years but I don't believe the answers have
> been collected by anyone.
More information about the cvs-src