Page MenuHomeFreeBSD

devctl: allow to register a hook to receive the events
Needs ReviewPublic

Authored by bapt on Nov 30 2022, 5:06 PM.
Tags
None
Referenced Files
F61969856: D37573.diff
Mon, May 29, 9:03 AM
Unknown Object (File)
Sun, May 7, 7:00 AM
Unknown Object (File)
Mar 26 2023, 2:43 PM
Unknown Object (File)
Mar 22 2023, 6:42 PM
Unknown Object (File)
Mar 6 2023, 3:36 AM
Unknown Object (File)
Feb 28 2023, 6:44 PM
Unknown Object (File)
Feb 10 2023, 12:01 AM
Unknown Object (File)
Jan 7 2023, 12:09 AM
Subscribers
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 48574
Build 45460: 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.Mon, May 22, 7:58 PM