tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

DRM-KMS: add a devclass DV_DRMKMS and allow userconf to deal with classes



[Please do CC me on reply since I _am_ subscribed to the list but don't
get the messages...]

Note: code can be seen on https://github.com/tlaronde/src .

I have implemented "patterns" in sys/kern/subr_userconf.c, in order to
allow to manipulate (change, disable, enable, find, list) a device
matching a possibly anchored substring.

But this doesn't solve the problem for dmskms (to be able to disable all
with a single well knows instruction) since the names don't match a
regular pattern.

I propose to add a DV_DRMKMS class to sys/device.h:enum_devclass; to
augment cfdata with a devclass member and modify config(1) accordingly
so that in sys/kern/subr_userconf.c can be introduced a (supplementary
for now; not replacing) new syntax:

exp: number | string | magic | pattern

string: '"' alpha alphanum* '"'	/* case insensitive */
magic: alpha alphanum	/* case insensitive */
pattern: '/' ['^'] alphanum ['$'] '/'	/* case insensitive */

{change, disable, enable, find, list} name = exp
{change, disable, enable, find, list} class = magic

so that:

disable class = drmkms

does the trick.

There is already in usr.bin/config/TODO a paragraph about classes, so
it seems this proposal leans towards what was expected.

Comments?
-- 
        Thierry Laronde <tlaronde +AT+ kergis +dot+ com>
                     http://www.kergis.com/
                    http://kertex.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C


Home | Main Index | Thread Index | Old Index