Subject: Re: Extendability of drvctl_command_table
To: Martin Husemann <martin@duskware.de>
From: Jachym Holecek <freza@NetBSD.org>
List: tech-kern
Date: 06/29/2007 15:42:20
# Martin Husemann 2007-06-29:
> I was curious what parts of our kernel already *receive* a proplib object
> from userland and ran into drvctl.
> 
> I first wondered why it is passing a dictionary at all, but given the
> arbitrary list of locators that can be passed, this does make sense.
> Within the same directory it also passes the command - as a string.
> 
> Noting that the list of commands is fixed currently, this does not make
> a lot sense to me.

Yah, looks a bit too creative... (I recently came across that as well
and was wondering what was the point).

> But if the drvctl_command_table would be extendable, it allows third party
> LKMs to come with their own, private, drvctl commands.

The drvctl pseudo device is an interface to system's autoconf(9)
machinery, so I don't see much point in making it extensible. And
there's a fairly fixed set of commands it can provide, so the ioctl
'cmd' number can be used to dispatch them without any lossage in
elegance/flexibility that I could see (most of these commands would
pass dictionaries, though). FWIW I'm working in this general area
part of my SoC project.

	-- Jachym