adds experimental sys.Errno to begin decoupling from the syscall package (#1582)

Signed-off-by: Adrian Cole <adrian@tetrate.io>
This commit is contained in:
Crypt Keeper
2023-07-17 08:13:29 +08:00
committed by GitHub
parent 1dafce0b2a
commit 2f8dd23097
94 changed files with 1591 additions and 1374 deletions

View File

@@ -5,12 +5,11 @@ package sysfs
import (
"io/fs"
"os"
"syscall"
"github.com/tetratelabs/wazero/internal/platform"
"github.com/tetratelabs/wazero/experimental/sys"
)
func openFile(path string, flag int, perm fs.FileMode) (*os.File, syscall.Errno) {
func openFile(path string, flag int, perm fs.FileMode) (*os.File, sys.Errno) {
f, err := os.OpenFile(path, flag, perm)
return f, platform.UnwrapOSError(err)
return f, sys.UnwrapOSError(err)
}