From e599b5583dd821ed26bdfc01f7f67d4a317b9843 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 16 Feb 2025 17:26:09 +0900 Subject: fmsg: implement suspend in writer This removes the requirement to call fmsg.Exit on every exit path, and enables direct use of the "log" package. However, fmsg.BeforeExit is still encouraged when possible to catch exit on suspended output. Signed-off-by: Ophestra --- internal/system/xhost.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'internal/system/xhost.go') diff --git a/internal/system/xhost.go b/internal/system/xhost.go index 57168b81..89e63db5 100644 --- a/internal/system/xhost.go +++ b/internal/system/xhost.go @@ -24,18 +24,18 @@ func (x XHost) Type() Enablement { } func (x XHost) apply(_ *I) error { - fmsg.VPrintf("inserting entry %s to X11", x) + fmsg.Verbosef("inserting entry %s to X11", x) return fmsg.WrapErrorSuffix(xcb.ChangeHosts(xcb.HostModeInsert, xcb.FamilyServerInterpreted, "localuser\x00"+string(x)), fmt.Sprintf("cannot insert entry %s to X11:", x)) } func (x XHost) revert(_ *I, ec *Criteria) error { if ec.hasType(x) { - fmsg.VPrintf("deleting entry %s from X11", x) + fmsg.Verbosef("deleting entry %s from X11", x) return fmsg.WrapErrorSuffix(xcb.ChangeHosts(xcb.HostModeDelete, xcb.FamilyServerInterpreted, "localuser\x00"+string(x)), fmt.Sprintf("cannot delete entry %s from X11:", x)) } else { - fmsg.VPrintf("skipping entry %s in X11", x) + fmsg.Verbosef("skipping entry %s in X11", x) return nil } } -- cgit v1.3.1