aboutsummaryrefslogtreecommitdiffhomepage
path: root/system/xhost.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-03-17 02:31:46 +0900
committerOphestra <cat@gensokyo.uk>2025-03-17 02:44:07 +0900
commit9a1f8e129fe0f9919981b8a1d345a9b455bd76de (patch)
treee52f33a3908c256aebb30f059cabd40f371a886f /system/xhost.go
parentee108603572101ad3c285830e04ee248916b6c5d (diff)
sandbox: wrap fmsg interface
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'system/xhost.go')
-rw-r--r--system/xhost.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/system/xhost.go b/system/xhost.go
index a20e1991..480cacc7 100644
--- a/system/xhost.go
+++ b/system/xhost.go
@@ -22,19 +22,19 @@ func (x XHost) Type() Enablement {
return EX11
}
-func (x XHost) apply(sys *I) error {
- sys.printf("inserting entry %s to X11", x)
- return sys.wrapErrSuffix(xcb.ChangeHosts(xcb.HostModeInsert, xcb.FamilyServerInterpreted, "localuser\x00"+string(x)),
+func (x XHost) apply(*I) error {
+ msg.Verbosef("inserting entry %s to X11", x)
+ return wrapErrSuffix(xcb.ChangeHosts(xcb.HostModeInsert, xcb.FamilyServerInterpreted, "localuser\x00"+string(x)),
fmt.Sprintf("cannot insert entry %s to X11:", x))
}
-func (x XHost) revert(sys *I, ec *Criteria) error {
+func (x XHost) revert(_ *I, ec *Criteria) error {
if ec.hasType(x) {
- sys.printf("deleting entry %s from X11", x)
- return sys.wrapErrSuffix(xcb.ChangeHosts(xcb.HostModeDelete, xcb.FamilyServerInterpreted, "localuser\x00"+string(x)),
+ msg.Verbosef("deleting entry %s from X11", x)
+ return wrapErrSuffix(xcb.ChangeHosts(xcb.HostModeDelete, xcb.FamilyServerInterpreted, "localuser\x00"+string(x)),
fmt.Sprintf("cannot delete entry %s from X11:", x))
} else {
- sys.printf("skipping entry %s in X11", x)
+ msg.Verbosef("skipping entry %s in X11", x)
return nil
}
}