mirror of
https://github.com/dennwc/btrfs
synced 2025-02-12 01:27:12 +00:00
expose method to get the subvolume id
This commit is contained in:
parent
ae959341a5
commit
e24c76dba4
8
btrfs.go
8
btrfs.go
@ -60,6 +60,14 @@ type Info struct {
|
||||
CloneAlignment uint32
|
||||
}
|
||||
|
||||
func (f *FS) SubVolumeID() (uint64, error) {
|
||||
id, err := getFileRootID(f.f)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
return uint64(id), nil
|
||||
}
|
||||
|
||||
func (f *FS) Info() (out Info, err error) {
|
||||
var arg btrfs_ioctl_fs_info_args
|
||||
arg, err = iocFsInfo(f.f)
|
||||
|
Loading…
Reference in New Issue
Block a user