Store inode in ITNode

This commit is contained in:
Yannick Ulrich 2023-02-19 12:23:18 +00:00
parent 0e0bfdc1f4
commit eb745def04
1 changed files with 4 additions and 3 deletions

View File

@ -17,6 +17,7 @@ type ITProperty struct {
type ITNode struct {
fs.Inode
kind int
Ino uint64
}
var properties = []ITProperty {
@ -75,7 +76,7 @@ func (n *ITNode) Lookup(ctx context.Context, name string, out *fuse.EntryOut) (*
Mode: fuse.S_IFDIR,
Ino: uint64(0),
}
operations := &ITNode{kind: 1}
operations := &ITNode{kind: 1, Ino: 0}
child := n.NewInode(ctx, operations, stable)
return child, 0
} else if name == "fs" {
@ -83,7 +84,7 @@ func (n *ITNode) Lookup(ctx context.Context, name string, out *fuse.EntryOut) (*
Mode: fuse.S_IFDIR,
Ino: uint64(1),
}
operations := &ITNode{kind: 2}
operations := &ITNode{kind: 2, Ino: 1}
child := n.NewInode(ctx, operations, stable)
return child, 0
}
@ -95,7 +96,7 @@ func (n *ITNode) Lookup(ctx context.Context, name string, out *fuse.EntryOut) (*
Mode: fuse.S_IFREG,
Ino: uint64(value.Ino),
}
operations := &ITNode{kind: 3}
operations := &ITNode{kind: 3, Ino: value.Ino}
child := n.NewInode(ctx, operations, stable)
return child, 0
}