github.com/gaukas/wazerofs@v0.1.0/sysfs/ino_plan9.go (about)

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