Debian Codegraph @

btrfs_list.go

raw symbols SCIP
1 package btrfs
2
3 import "os"
4
5 func getFileRootID(file *os.File) (objectID, error) {
6 args := btrfs_ioctl_ino_lookup_args{
7 objectid: firstFreeObjectid,
8 }
9 if err := iocInoLookup(file, &args); err != nil {
10 return 0, err
11 }
12 return args.treeid, nil
13 }
14
15 func getPathRootID(path string) (objectID, error) {
16 fs, err := Open(path, true)
17 if err != nil {
18 return 0, err
19 }
20 defer fs.Close()
21 return getFileRootID(fs.f)
22 }