Files
wazero/internal/sysfs/open_file_sun.go
Crypt Keeper 34324031cb extracts FS interfaces into fsapi package and consolidates impls (#1477)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
Co-authored-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
2023-05-17 07:19:54 +03:00

22 lines
503 B
Go

//go:build illumos || solaris
package sysfs
import (
"io/fs"
"os"
"syscall"
"github.com/tetratelabs/wazero/internal/fsapi"
"github.com/tetratelabs/wazero/internal/platform"
)
func newOsFile(openPath string, openFlag int, openPerm fs.FileMode, f *os.File) fsapi.File {
return newDefaultOsFile(openPath, openFlag, openPerm, f)
}
func openFile(path string, flag int, perm fs.FileMode) (*os.File, syscall.Errno) {
f, err := os.OpenFile(path, flag, perm)
return f, platform.UnwrapOSError(err)
}