aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/initdev.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-08-29 01:46:54 +0900
committerOphestra <cat@gensokyo.uk>2025-08-29 01:46:54 +0900
commiteb3385d490523262e26b6cb691a5e18a07a8b26d (patch)
treeed8e9e95f81b4962ebf23d206e963b016975f6c9 /container/initdev.go
parentb8669338da36c9a4fabec6c49cad20a5f8180cf2 (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.go8
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)
}