aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/app/share.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-02-16 17:26:09 +0900
committerOphestra <cat@gensokyo.uk>2025-02-16 18:51:53 +0900
commite599b5583dd821ed26bdfc01f7f67d4a317b9843 (patch)
treeb444a3dc964814360e6779bc10b30f2e599b537c /internal/app/share.go
parent33a4ab11c226c736c0d8b2644fbbe27a5ca045e9 (diff)
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 <cat@gensokyo.uk>
Diffstat (limited to 'internal/app/share.go')
-rw-r--r--internal/app/share.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/app/share.go b/internal/app/share.go
index 9e7d0f17..c7f0c7a3 100644
--- a/internal/app/share.go
+++ b/internal/app/share.go
@@ -143,7 +143,7 @@ func (seal *appSeal) setupShares(bus [2]*dbus.Config, os linux.System) error {
if seal.et.Has(system.EWayland) {
var socketPath string
if name, ok := os.LookupEnv(wl.WaylandDisplay); !ok {
- fmsg.VPrintln(wl.WaylandDisplay + " is not set, assuming " + wl.FallbackName)
+ fmsg.Verbose(wl.WaylandDisplay + " is not set, assuming " + wl.FallbackName)
socketPath = path.Join(seal.RuntimePath, wl.FallbackName)
} else if !path.IsAbs(name) {
socketPath = path.Join(seal.RuntimePath, name)
@@ -166,7 +166,7 @@ func (seal *appSeal) setupShares(bus [2]*dbus.Config, os linux.System) error {
seal.sys.Wayland(outerPath, socketPath, appID, seal.id)
seal.sys.bwrap.Bind(outerPath, innerPath)
} else { // bind mount wayland socket (insecure)
- fmsg.VPrintln("direct wayland access, PROCEED WITH CAUTION")
+ fmsg.Verbose("direct wayland access, PROCEED WITH CAUTION")
seal.sys.bwrap.Bind(socketPath, innerPath)
// ensure Wayland socket ACL (e.g. `/run/user/%d/wayland-%d`)
@@ -229,7 +229,7 @@ func (seal *appSeal) setupShares(bus [2]*dbus.Config, os linux.System) error {
// publish current user's pulse cookie for target user
if src, err := discoverPulseCookie(os); err != nil {
// not fatal
- fmsg.VPrintln(strings.TrimSpace(err.(*fmsg.BaseError).Message()))
+ fmsg.Verbose(strings.TrimSpace(err.(*fmsg.BaseError).Message()))
} else {
dst := path.Join(seal.share, "pulse-cookie")
innerDst := fst.Tmp + "/pulse-cookie"