system/wayland: use syscall dispatcher
All checks were successful
Test / Create distribution (push) Successful in 32s
Test / Sandbox (push) Successful in 2m6s
Test / Hpkg (push) Successful in 3m46s
Test / Sandbox (race detector) (push) Successful in 4m26s
Test / Hakurei (race detector) (push) Successful in 5m4s
Test / Hakurei (push) Successful in 2m8s
Test / Flake checks (push) Successful in 1m27s
All checks were successful
Test / Create distribution (push) Successful in 32s
Test / Sandbox (push) Successful in 2m6s
Test / Hpkg (push) Successful in 3m46s
Test / Sandbox (race detector) (push) Successful in 4m26s
Test / Hakurei (race detector) (push) Successful in 5m4s
Test / Hakurei (push) Successful in 2m8s
Test / Flake checks (push) Successful in 1m27s
This enables wayland op methods to be instrumented. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -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...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user