From 712cfc06d7e541c6e28b4b127a4760b4cfccffa8 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sat, 30 Aug 2025 23:44:48 +0900 Subject: container: wrap container init start errors This helps indicate the exact origin and nature of the error. This eliminates generic WrapErr from container. Signed-off-by: Ophestra --- container/dispatcher.go | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'container/dispatcher.go') diff --git a/container/dispatcher.go b/container/dispatcher.go index c94d9348..dc8d9a44 100644 --- a/container/dispatcher.go +++ b/container/dispatcher.go @@ -138,8 +138,6 @@ type syscallDispatcher interface { resume() bool // beforeExit provides [Msg.BeforeExit]. beforeExit() - // printBaseErr provides [Msg.PrintBaseErr]. - printBaseErr(err error, fallback string) } // direct implements syscallDispatcher on the current kernel. @@ -234,12 +232,11 @@ func (direct) wait4(pid int, wstatus *syscall.WaitStatus, options int, rusage *s return syscall.Wait4(pid, wstatus, options, rusage) } -func (direct) printf(format string, v ...any) { log.Printf(format, v...) } -func (direct) fatal(v ...any) { log.Fatal(v...) } -func (direct) fatalf(format string, v ...any) { log.Fatalf(format, v...) } -func (direct) verbose(v ...any) { msg.Verbose(v...) } -func (direct) verbosef(format string, v ...any) { msg.Verbosef(format, v...) } -func (direct) suspend() { msg.Suspend() } -func (direct) resume() bool { return msg.Resume() } -func (direct) beforeExit() { msg.BeforeExit() } -func (direct) printBaseErr(err error, fallback string) { msg.PrintBaseErr(err, fallback) } +func (direct) printf(format string, v ...any) { log.Printf(format, v...) } +func (direct) fatal(v ...any) { log.Fatal(v...) } +func (direct) fatalf(format string, v ...any) { log.Fatalf(format, v...) } +func (direct) verbose(v ...any) { msg.Verbose(v...) } +func (direct) verbosef(format string, v ...any) { msg.Verbosef(format, v...) } +func (direct) suspend() { msg.Suspend() } +func (direct) resume() bool { return msg.Resume() } +func (direct) beforeExit() { msg.BeforeExit() } -- cgit v1.3.1