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, Apr 25, 2:17 AM
Unknown Object (File)
Thu, Apr 25, 1:33 AM
Unknown Object (File)
Mon, Apr 22, 6:21 AM
Unknown Object (File)
Sat, Apr 20, 3:49 AM
Unknown Object (File)
Fri, Mar 29, 4:01 PM
Unknown Object (File)
Mar 18 2024, 11:42 PM
Unknown Object (File)
Mar 18 2024, 11:42 PM
Unknown Object (File)
Mar 18 2024, 11:41 PM

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 51608
Build 48499: arc lint + arc unit

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