devctl_notify system is inconsistent

From: Baptiste Daroussin <>
Date: Thu, 01 Dec 2022 08:35:59 UTC

After the addition of netlink(4) by melifaro@, I started working on a new
genetlink(4) module, to send kernel notification to the userland via netlink.

The goal is to be able to have multiple consumers without the need of devd to be

The goal is also to be able subscribe to the events the consumer is willing to

I also added a hook to devctl_notify to make sure all its event got sent via
nlsysevent. (

It works great and so far I am happy with it. on thing I figured out it is:
the "system" argment of devctl_notify is inconsistent:
Upper case vs lower case
"kern" vs "kernel"

I intent to fix the following way:
Create a new function similar to devctl_notify but with the first argument being
an enum.
Make the current devctl_notify convert its first argument into that enum and
yell if an unkwown "system" is passed. (and probably declare devctl_notify

Then fix the inconsistencies: all upper case as it seems the most wildly use


Best regards,