mirror of
https://github.com/troglobit/finit.git
synced 2026-11-12 16:51:25 +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
@@ -163,6 +163,22 @@ int coldplug (void);
|
||||
int coldplug_trigger (const char *action, const char *subsys_glob);
|
||||
int uevent_action_valid(const char *action);
|
||||
|
||||
/* keventd.c: queue and rules state, for the D-Bus layer */
|
||||
unsigned long long kev_seq_processed(void);
|
||||
void kev_seq_baseline (void);
|
||||
int kev_queue_empty (void);
|
||||
int kev_rules_reload (void);
|
||||
|
||||
#ifdef HAVE_DBUS
|
||||
#include <uev/uev.h>
|
||||
|
||||
/* dbus.c: org.finit.Device1 on /run/keventd/bus */
|
||||
int devbus_init (uev_ctx_t *ctx, int passive);
|
||||
void devbus_exit (void);
|
||||
void devbus_notify (const char *devpath, const char *action);
|
||||
int devbus_client_settle(int timeout_s);
|
||||
#endif
|
||||
|
||||
#endif /* FINIT_KEVENTD_H_ */
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user