From 792013cefbeb7413c60bd24e7014f8a9e0622540 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Fri, 17 Oct 2025 06:32:21 +0900 Subject: internal/app/sppulse: check behaviour Still needs to check the relocated functions separately. Signed-off-by: Ophestra --- internal/app/sppulse.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'internal/app/sppulse.go') diff --git a/internal/app/sppulse.go b/internal/app/sppulse.go index 0adce110..9cc172da 100644 --- a/internal/app/sppulse.go +++ b/internal/app/sppulse.go @@ -20,6 +20,7 @@ const pulseCookieSizeMax = 1 << 8 func init() { gob.Register(new(spPulseOp)) } // spPulseOp exports the PulseAudio server to the container. +// Runs after spRuntimeOp. type spPulseOp struct { // PulseAudio cookie data, populated during toSystem if a cookie is present. Cookie *[pulseCookieSizeMax]byte @@ -36,14 +37,14 @@ func (s *spPulseOp) toSystem(state *outcomeStateSys) error { if !errors.Is(err, fs.ErrNotExist) { return &hst.AppError{Step: fmt.Sprintf("access PulseAudio directory %q", pulseRuntimeDir), Err: err} } - return newWithMessage(fmt.Sprintf("PulseAudio directory %q not found", pulseRuntimeDir)) + return newWithMessageError(fmt.Sprintf("PulseAudio directory %q not found", pulseRuntimeDir), err) } if fi, err := state.k.stat(pulseSocket.String()); err != nil { if !errors.Is(err, fs.ErrNotExist) { return &hst.AppError{Step: fmt.Sprintf("access PulseAudio socket %q", pulseSocket), Err: err} } - return newWithMessage(fmt.Sprintf("PulseAudio directory %q found but socket does not exist", pulseRuntimeDir)) + return newWithMessageError(fmt.Sprintf("PulseAudio directory %q found but socket does not exist", pulseRuntimeDir), err) } else { if m := fi.Mode(); m&0o006 != 0o006 { return newWithMessage(fmt.Sprintf("unexpected permissions on %q: %s", pulseSocket, m)) -- cgit v1.3.1