github.com/wasilibs/wazerox@v0.0.0-20240124024944-4923be63ab5f/internal/sysfs/ino_plan9.go (about)

     1  package sysfs
     2  
     3  import (
     4  	"io/fs"
     5  
     6  	experimentalsys "github.com/wasilibs/wazerox/experimental/sys"
     7  	"github.com/wasilibs/wazerox/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  }