mirror of
https://github.com/troglobit/finit.git
synced 2026-11-07 16:01:08 +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
@@ -9,6 +9,9 @@ keventd_SOURCES = keventd.c keventd.h uevent.c \
|
||||
rules.c rules.h \
|
||||
builtin.c builtin.h \
|
||||
$(top_srcdir)/src/util.c $(top_srcdir)/src/util.h
|
||||
# Per-target flags exist even when their conditional is false, so
|
||||
# assign the base unconditionally and append under DBUS
|
||||
keventd_CPPFLAGS = $(AM_CPPFLAGS)
|
||||
keventd_CFLAGS = -W -Wall -Wextra -std=gnu99
|
||||
# Silence noisy false positives from PATH_MAX-into-PATH_MAX sysfs path
|
||||
# concatenations; real concerns (e.g. USB strings into small buffers) are
|
||||
@@ -21,6 +24,12 @@ keventd_LDADD = $(lite_LIBS)
|
||||
keventd_LDADD += $(uev_LIBS)
|
||||
keventd_LDADD += $(blkid_LIBS)
|
||||
|
||||
if DBUS
|
||||
keventd_SOURCES += dbus.c
|
||||
keventd_CPPFLAGS += -I$(top_srcdir)/libink
|
||||
keventd_LDADD += $(top_builddir)/libink/libink.la
|
||||
endif
|
||||
|
||||
# Curated udev rules derived from eudev 3.2.14 (GPL-2.0-or-later).
|
||||
# Installed to /lib/udev/rules.d/ so existing third-party rules and
|
||||
# local overrides under /etc/udev/rules.d/ coexist with standard udev
|
||||
|
||||
Reference in new issue
Block a user