btrfs/btrfs_list.go
Denys Smirnov b300237e77 Implement basic subvolume and snapshot commands. Exec-based send and receive.
* better code generator

* regenerate btrfs_tree.h constants

* implement subvolume create, delete and snapshot create commands

* exec-based snapshot send and receive
2016-09-15 20:39:46 +03:00

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
}