github.com/bananabytelabs/wazero@v0.0.0-20240105073314-54b22a776da8/internal/sysfs/ino_plan9.go (about)

     1  package sysfs
     2  
     3  import (
     4  	"io/fs"
     5  
     6  	experimentalsys "github.com/bananabytelabs/wazero/experimental/sys"
     7  	"github.com/bananabytelabs/wazero/sys"
     8  )
     9  
    10  func inoFromFileInfo(_ string, info fs.FileInfo) (sys.Inode, experimentalsys.Errno) {
    11  	if v, ok := info.Sys().(*sys.Stat_t); ok {
    12  		return v.Ino, 0
    13  	}
    14  	return 0, 0
    15  }