forked from RepoMirrors/btrfs
b300237e77
* better code generator * regenerate btrfs_tree.h constants * implement subvolume create, delete and snapshot create commands * exec-based snapshot send and receive
14 lines
249 B
Go
14 lines
249 B
Go
package btrfs
|
|
|
|
import "os"
|
|
|
|
func getPathRootID(file *os.File) (uint64, error) {
|
|
args := btrfs_ioctl_ino_lookup_args{
|
|
objectid: firstFreeObjectid,
|
|
}
|
|
if err := iocInoLookup(file, &args); err != nil {
|
|
return 0, err
|
|
}
|
|
return args.treeid, nil
|
|
}
|