From 08eeafe8174efed2414d66788a927168efeba691 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Fri, 29 Aug 2025 22:15:05 +0900 Subject: container/mount: unwrap vfs decoder errors These are now handled by init. This eliminates generic WrapErr from mount and procPaths. Signed-off-by: Ophestra --- container/errors.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'container/errors.go') diff --git a/container/errors.go b/container/errors.go index 8d8ad492..f4198b09 100644 --- a/container/errors.go +++ b/container/errors.go @@ -4,17 +4,19 @@ import ( "errors" "os" "syscall" + + "hakurei.app/container/vfs" ) // messageFromError returns a printable error message for a supported concrete type. func messageFromError(err error) (string, bool) { - if m, ok := messagePrefixP[MountError, *MountError]("cannot ", err); ok { + if m, ok := messagePrefixP[MountError]("cannot ", err); ok { return m, ok } - if m, ok := messagePrefixP[os.PathError, *os.PathError]("cannot ", err); ok { + if m, ok := messagePrefixP[os.PathError]("cannot ", err); ok { return m, ok } - if m, ok := messagePrefixP[AbsoluteError, *AbsoluteError]("", err); ok { + if m, ok := messagePrefixP[AbsoluteError]("", err); ok { return m, ok } if m, ok := messagePrefix[OpRepeatError]("", err); ok { @@ -24,6 +26,9 @@ func messageFromError(err error) (string, bool) { return m, ok } + if m, ok := messagePrefixP[vfs.DecoderError]("cannot ", err); ok { + return m, ok + } if m, ok := messagePrefix[TmpfsSizeError]("", err); ok { return m, ok } -- cgit v1.3.1