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>
22 lines
503 B
Go
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)
|
|
}
|