diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-10-14 01:33:44 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-10-14 01:33:44 +0900 |
| commit | 790d77075e40ee3162d7925e983f01747b5c2c89 (patch) | |
| tree | 56a59641aa87a40c9b28600ff8bd5d5642d95f5e /internal/app/dispatcher.go | |
| parent | e5ff40e7d32d28cace183cd2c80f40f142855ff5 (diff) | |
system/dbus: remove builder state leak
This enables external testing of system.I state.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/app/dispatcher.go')
| -rw-r--r-- | internal/app/dispatcher.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/app/dispatcher.go b/internal/app/dispatcher.go index d56278a0..d298d6b6 100644 --- a/internal/app/dispatcher.go +++ b/internal/app/dispatcher.go @@ -13,6 +13,7 @@ import ( "hakurei.app/container/check" "hakurei.app/internal" "hakurei.app/message" + "hakurei.app/system/dbus" ) // osFile represents [os.File]. @@ -63,6 +64,9 @@ type syscallDispatcher interface { // mustHsuPath provides [internal.MustHsuPath]. mustHsuPath() *check.Absolute + // dbusAddress provides [dbus.Address]. + dbusAddress() (session, system string) + // fatalf provides [log.Fatalf]. fatalf(format string, v ...any) } @@ -99,4 +103,6 @@ func (direct) overflowGid(msg message.Msg) int { return container.OverflowGid(ms func (direct) mustHsuPath() *check.Absolute { return internal.MustHsuPath() } +func (k direct) dbusAddress() (session, system string) { return dbus.Address() } + func (direct) fatalf(format string, v ...any) { log.Fatalf(format, v...) } |
