container/init: unwrap path errors
All checks were successful
Test / Create distribution (push) Successful in 34s
Test / Sandbox (push) Successful in 1m49s
Test / Hakurei (push) Successful in 3m18s
Test / Hpkg (push) Successful in 3m43s
Test / Sandbox (race detector) (push) Successful in 3m53s
Test / Hakurei (race detector) (push) Successful in 5m16s
Test / Flake checks (push) Successful in 1m36s
All checks were successful
Test / Create distribution (push) Successful in 34s
Test / Sandbox (push) Successful in 1m49s
Test / Hakurei (push) Successful in 3m18s
Test / Hpkg (push) Successful in 3m43s
Test / Sandbox (race detector) (push) Successful in 3m53s
Test / Hakurei (race detector) (push) Successful in 5m16s
Test / Flake checks (push) Successful in 1m36s
These are also now handled by init properly, so wrapping them in self is meaningless and unreachable. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -118,7 +118,7 @@ func (p *procPaths) remount(target string, flags uintptr) error {
|
||||
|
||||
var targetFinal string
|
||||
if v, err := p.k.evalSymlinks(target); err != nil {
|
||||
return wrapErrSelf(err)
|
||||
return err
|
||||
} else {
|
||||
targetFinal = v
|
||||
if targetFinal != target {
|
||||
@@ -134,14 +134,12 @@ func (p *procPaths) remount(target string, flags uintptr) error {
|
||||
destFd, err = p.k.open(targetFinal, O_PATH|O_CLOEXEC, 0)
|
||||
return
|
||||
}); err != nil {
|
||||
return wrapErrSuffix(err,
|
||||
fmt.Sprintf("cannot open %q:", targetFinal))
|
||||
return &os.PathError{Op: "open", Path: targetFinal, Err: err}
|
||||
}
|
||||
if v, err := p.k.readlink(p.fd(destFd)); err != nil {
|
||||
return wrapErrSelf(err)
|
||||
return err
|
||||
} else if err = p.k.close(destFd); err != nil {
|
||||
return wrapErrSuffix(err,
|
||||
fmt.Sprintf("cannot close %q:", targetFinal))
|
||||
return &os.PathError{Op: "close", Path: targetFinal, Err: err}
|
||||
} else {
|
||||
targetKFinal = v
|
||||
}
|
||||
@@ -202,7 +200,7 @@ func mountTmpfs(k syscallDispatcher, fsname, target string, flags uintptr, size
|
||||
// syscallDispatcher.mountTmpfs must not be called from this function
|
||||
|
||||
if err := k.mkdirAll(target, parentPerm(perm)); err != nil {
|
||||
return wrapErrSelf(err)
|
||||
return err
|
||||
}
|
||||
opt := fmt.Sprintf("mode=%#o", perm)
|
||||
if size > 0 {
|
||||
|
||||
Reference in New Issue
Block a user