mirror of
https://github.com/troglobit/finit.git
synced 2026-10-29 12:40:44 +00:00
keventd: serve org.finit.Device1 on /run/keventd/bus
The udev parity gaps that were blocked on IPC -- settle, trigger,
info, queue introspection, runtime rule reload -- become bus methods.
keventd serves its own socket the way Finit serves /run/finit/bus:
brokerless, libink, one socket per daemon, no forwarding between the
two.
Settle(u) -> b parked until the queue drains or the timeout
passes; true when settled
Trigger(s, s) replay events, action + subsystem glob
Info(s) -> a{ss} /run/udev/data properties for a devpath
RulesReload() -> u re-read rules dirs, returns rule count
QueueEmpty (b), SeqnumProcessed (t) properties
DeviceProcessed (ss) signal after each fully handled event
The queue state is the highest kernel seqnum keventd has handled,
baselined at startup, against /sys/kernel/uevent_seqnum. keventd -S
now asks the running daemon first and falls back to seqnum polling.
In passive mode Trigger and RulesReload refuse. Adds
link_call_connection() for the park bookkeeping.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
10 files changed
+811
-23
No files matched your search
@@ -215,6 +215,38 @@ service cron {
|
||||
command = "cron -f"
|
||||
}
|
||||
.Ed
|
||||
.Sh D-BUS INTERFACE
|
||||
With D-Bus support,
|
||||
.Nm
|
||||
serves
|
||||
.Cm org.finit.Device1
|
||||
at
|
||||
.Pa /org/finit/device
|
||||
on its own brokerless bus,
|
||||
.Pa unix:path=/run/keventd/bus ,
|
||||
the same way
|
||||
.Xr finit 8
|
||||
serves
|
||||
.Cm org.finit .
|
||||
Methods:
|
||||
.Bl -tag -width RulesReload -offset indent -compact
|
||||
.It Cm Settle (u) -> b
|
||||
Wait until the device event queue drains, timeout in seconds
|
||||
.It Cm Trigger (ss)
|
||||
Replay events: action and subsystem glob, empty glob matches all
|
||||
.It Cm Info (s) -> a{ss}
|
||||
Device properties for a devpath, from /run/udev/data
|
||||
.It Cm RulesReload () -> u
|
||||
Re-read the udev rules directories, returns the rule count
|
||||
.El
|
||||
.Pp
|
||||
Properties
|
||||
.Cm QueueEmpty (b)
|
||||
and
|
||||
.Cm SeqnumProcessed (t)
|
||||
expose the queue state; the
|
||||
.Cm DeviceProcessed (ss)
|
||||
signal fires after each fully handled event.
|
||||
.Sh NETLINK REBROADCAST
|
||||
The Linux kernel sends uevents to netlink multicast group 1 (bit 0) of
|
||||
.Dv NETLINK_KOBJECT_UEVENT .
|
||||
|
||||
Reference in new issue
Block a user