aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/app/sppulse.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-10-17 06:32:21 +0900
committerOphestra <cat@gensokyo.uk>2025-10-17 06:32:21 +0900
commit792013cefbeb7413c60bd24e7014f8a9e0622540 (patch)
tree55887ee1fcfb22448124ca3958c7b666d2b89a2e /internal/app/sppulse.go
parent3f391329357789f55559404a3d28c60679111a74 (diff)
internal/app/sppulse: check behaviour
Still needs to check the relocated functions separately. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/app/sppulse.go')
-rw-r--r--internal/app/sppulse.go5
1 files changed, 3 insertions, 2 deletions
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))