Page MenuHomeFreeBSD

devctl: allow to register a hook to receive the events
ClosedPublic

Authored by bapt on Nov 30 2022, 5:06 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 31, 11:05 AM
Unknown Object (File)
Tue, Oct 29, 3:37 AM
Unknown Object (File)
Sat, Oct 26, 1:26 AM
Unknown Object (File)
Oct 18 2024, 12:34 AM
Unknown Object (File)
Oct 17 2024, 11:41 PM
Unknown Object (File)
Oct 17 2024, 11:41 PM
Unknown Object (File)
Oct 17 2024, 11:41 PM
Unknown Object (File)
Oct 17 2024, 11:41 PM

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bapt requested review of this revision.Nov 30 2022, 5:06 PM
sys/kern/kern_devctl.c
139

why only one?

443

and why here rather than in devctl_queue?

sys/kern/kern_devctl.c
139

because I didn't plan to add more hooks, but I can turn it into a hook.

443

Look at D37574 my goal is to be able to allow consumers to subscribe at the "system" level" so I don't want the message to be preformated.

sys/kern/kern_devctl.c
443

You're missing all the device events if you do this then. It's too high a level.
And the messages already are pre-formatted by the time they get here, except for the system, subsystem and type that are added.
The data that's passed in is already a bunch of keyword=value pairs that are created using certain rules to avoid quoting issues.

Add all the device events
Add a generic structure for events classification

bapt marked an inline comment as done.May 22 2023, 7:58 PM
imp added inline comments.
sys/sys/devctl.h
37

This might be better committed with a different commit since it's unreferenced here.

This revision is now accepted and ready to land.Jun 1 2023, 6:06 PM