diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-09-11 01:48:18 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-09-11 01:48:18 +0900 |
| commit | c8a0effe908c22c350c5c492b0e5bbeefc8749f1 (patch) | |
| tree | 095ce301c53f20aac3f306146670ce69dac30b42 /system/dispatcher.go | |
| parent | 8df01b71d4df56c8b601ca8398b9c09315b69cb8 (diff) | |
system/wayland: use syscall dispatcher
This enables wayland op methods to be instrumented.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'system/dispatcher.go')
| -rw-r--r-- | system/dispatcher.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/system/dispatcher.go b/system/dispatcher.go index f8de2ff9..36defd1f 100644 --- a/system/dispatcher.go +++ b/system/dispatcher.go @@ -3,6 +3,7 @@ package system import ( "io" "io/fs" + "log" "os" "hakurei.app/system/acl" @@ -37,6 +38,9 @@ type syscallDispatcher interface { // remove provides os.Remove. remove(name string) error + // println provides [log.Println]. + println(v ...any) + // aclUpdate provides [acl.Update]. aclUpdate(name string, uid int, perms ...acl.Perm) error @@ -71,6 +75,8 @@ func (k direct) chmod(name string, mode os.FileMode) error { return os.Chmod(nam func (k direct) link(oldname, newname string) error { return os.Link(oldname, newname) } func (k direct) remove(name string) error { return os.Remove(name) } +func (k direct) println(v ...any) { log.Println(v...) } + func (k direct) aclUpdate(name string, uid int, perms ...acl.Perm) error { return acl.Update(name, uid, perms...) } |
