From 87b5c30ef6d5b7b8a10d6a5a8610054c403923e6 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Thu, 9 Oct 2025 05:04:08 +0900 Subject: message: relocate from container This package is quite useful. This change allows it to be imported without importing container. Signed-off-by: Ophestra --- internal/app/outcome.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'internal/app/outcome.go') diff --git a/internal/app/outcome.go b/internal/app/outcome.go index f029a4b9..f4589938 100644 --- a/internal/app/outcome.go +++ b/internal/app/outcome.go @@ -8,6 +8,7 @@ import ( "hakurei.app/container/check" "hakurei.app/hst" "hakurei.app/internal/app/state" + "hakurei.app/message" "hakurei.app/system" "hakurei.app/system/acl" ) @@ -61,7 +62,7 @@ type outcomeState struct { // Copied via populateLocal. k syscallDispatcher // Copied via populateLocal. - msg container.Msg + msg message.Msg } // valid checks outcomeState to be safe for use with outcomeOp. @@ -75,7 +76,7 @@ func (s *outcomeState) valid() bool { // populateEarly populates exported fields via syscallDispatcher. // This must only be called from the priv side. -func (s *outcomeState) populateEarly(k syscallDispatcher, msg container.Msg, config *hst.Config) { +func (s *outcomeState) populateEarly(k syscallDispatcher, msg message.Msg, config *hst.Config) { s.Shim = &shimParams{PrivPID: os.Getpid(), Verbose: msg.IsVerbose(), Ops: fromConfig(config)} // enforce bounds and default early @@ -98,7 +99,7 @@ func (s *outcomeState) populateEarly(k syscallDispatcher, msg container.Msg, con // populateLocal populates unexported fields from transmitted exported fields. // These fields are cheaper to recompute per-process. -func (s *outcomeState) populateLocal(k syscallDispatcher, msg container.Msg) error { +func (s *outcomeState) populateLocal(k syscallDispatcher, msg message.Msg) error { if !s.valid() || k == nil || msg == nil { return newWithMessage("impossible outcome state reached") } -- cgit v1.3.1