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
Unknown Object (File)
Wed, Mar 22, 6:42 PM
Unknown Object (File)
Mon, Mar 6, 3:36 AM
Unknown Object (File)
Tue, Feb 28, 6:44 PM
Unknown Object (File)
Feb 10 2023, 12:01 AM
Unknown Object (File)
Jan 7 2023, 12:09 AM
Unknown Object (File)
Jan 4 2023, 10:07 PM
Unknown Object (File)
Dec 14 2022, 4:18 AM
Unknown Object (File)
Dec 5 2022, 10:54 PM
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 48584
Build 45470: 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.