diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2022-07-02 16:25:03 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2022-07-02 16:43:01 -0600 |
commit | 9ddcd2c3ed2f85247161c5ffa653f33e6a01a9cd (patch) | |
tree | 5d673cf90f37ae7e75b1b4bbe41bc700cfe98c1f /pkg/btrfsmisc/print_tree.go | |
parent | eab4dbebf66fa92597a2804c39eb4a4670f5e2ca (diff) |
move things around
Diffstat (limited to 'pkg/btrfsmisc/print_tree.go')
-rw-r--r-- | pkg/btrfsmisc/print_tree.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pkg/btrfsmisc/print_tree.go b/pkg/btrfsmisc/print_tree.go index 94ec0b6..bc3224b 100644 --- a/pkg/btrfsmisc/print_tree.go +++ b/pkg/btrfsmisc/print_tree.go @@ -7,15 +7,16 @@ import ( "lukeshu.com/btrfs-tools/pkg/btrfs" "lukeshu.com/btrfs-tools/pkg/btrfs/btrfsitem" + "lukeshu.com/btrfs-tools/pkg/btrfs/btrfsvol" "lukeshu.com/btrfs-tools/pkg/util" ) // PrintTree mimics btrfs-progs // kernel-shared/print-tree.c:btrfs_print_tree() and // kernel-shared/print-tree.c:btrfs_print_leaf() -func PrintTree(fs *btrfs.FS, root btrfs.LogicalAddr) error { +func PrintTree(fs *btrfs.FS, root btrfsvol.LogicalAddr) error { return fs.TreeWalk(root, btrfs.TreeWalkHandler{ - Node: func(path btrfs.TreePath, nodeRef *util.Ref[btrfs.LogicalAddr, btrfs.Node], err error) error { + Node: func(path btrfs.TreePath, nodeRef *util.Ref[btrfsvol.LogicalAddr, btrfs.Node], err error) error { if err != nil { fmt.Fprintf(os.Stderr, "error: %v: %v\n", path, err) } @@ -319,7 +320,7 @@ func FmtKey(key btrfs.Key) string { case btrfsitem.QGROUP_RELATION_KEY: //TODO, btrfsitem.QGROUP_INFO_KEY, btrfsitem.QGROUP_LIMIT_KEY: panic("not implemented") case btrfsitem.UUID_SUBVOL_KEY, btrfsitem.UUID_RECEIVED_SUBVOL_KEY: - fmt.Fprintf(&out, " %v)", btrfs.PhysicalAddr(key.Offset)) + fmt.Fprintf(&out, " %v)", btrfsvol.PhysicalAddr(key.Offset)) case btrfsitem.ROOT_ITEM_KEY: fmt.Fprintf(&out, " %v)", btrfs.ObjID(key.Offset)) default: |