From eb3385d490523262e26b6cb691a5e18a07a8b26d Mon Sep 17 00:00:00 2001 From: Ophestra Date: Fri, 29 Aug 2025 01:46:54 +0900 Subject: container/initsymlink: unwrap mount errors The mount function now wraps its own errors in a much more descriptive type with proper message formatting. Wrapping them no longer makes any sense. Signed-off-by: Ophestra --- container/initdev.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'container/initdev.go') diff --git a/container/initdev.go b/container/initdev.go index 43ef5247..9bb95611 100644 --- a/container/initdev.go +++ b/container/initdev.go @@ -82,8 +82,7 @@ func (d *MountDevOp) apply(state *setupState, k syscallDispatcher) error { if err := k.mount(SourceDevpts, devPtsPath, FstypeDevpts, MS_NOSUID|MS_NOEXEC, "newinstance,ptmxmode=0666,mode=620"); err != nil { - return wrapErrSuffix(err, - fmt.Sprintf("cannot mount devpts on %q:", devPtsPath)) + return err } if state.RetainSession { @@ -111,7 +110,7 @@ func (d *MountDevOp) apply(state *setupState, k syscallDispatcher) error { return wrapErrSelf(err) } if err := k.mount(SourceMqueue, mqueueTarget, FstypeMqueue, MS_NOSUID|MS_NOEXEC|MS_NODEV, zeroString); err != nil { - return wrapErrSuffix(err, "cannot mount mqueue:") + return err } } @@ -120,8 +119,7 @@ func (d *MountDevOp) apply(state *setupState, k syscallDispatcher) error { } if err := k.remount(target, MS_RDONLY); err != nil { - return wrapErrSuffix(k.remount(target, MS_RDONLY), - fmt.Sprintf("cannot remount %q:", target)) + return err } return k.mountTmpfs(SourceTmpfs, devShmPath, MS_NOSUID|MS_NODEV, 0, 01777) } -- cgit v1.3.1