diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-08-29 01:46:54 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-08-29 01:46:54 +0900 |
| commit | eb3385d490523262e26b6cb691a5e18a07a8b26d (patch) | |
| tree | ed8e9e95f81b4962ebf23d206e963b016975f6c9 /container/initdev.go | |
| parent | b8669338da36c9a4fabec6c49cad20a5f8180cf2 (diff) | |
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 <cat@gensokyo.uk>
Diffstat (limited to 'container/initdev.go')
| -rw-r--r-- | container/initdev.go | 8 |
1 files changed, 3 insertions, 5 deletions
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) } |
