From bba3428e8f034802b4b5ceb772bde1285a65ee50 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 12 Jul 2022 17:01:13 -0600 Subject: Don't include the offset and size in btrfs.Item --- lib/btrfsprogs/btrfsutil/walk.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/btrfsprogs/btrfsutil') diff --git a/lib/btrfsprogs/btrfsutil/walk.go b/lib/btrfsprogs/btrfsutil/walk.go index d2322b2..d2b6367 100644 --- a/lib/btrfsprogs/btrfsutil/walk.go +++ b/lib/btrfsprogs/btrfsutil/walk.go @@ -60,14 +60,14 @@ func WalkAllTrees(fs *btrfs.FS, cbs WalkAllTreesHandler) { } origItem := cbs.Item cbs.Item = func(path btrfs.TreePath, item btrfs.Item) error { - if item.Head.Key.ItemType == btrfsitem.ROOT_ITEM_KEY { + if item.Key.ItemType == btrfsitem.ROOT_ITEM_KEY { trees = append(trees, struct { Name string ID btrfs.ObjID }{ Name: fmt.Sprintf("tree %v (via %v %v)", - item.Head.Key.ObjectID.Format(0), treeName, path), - ID: item.Head.Key.ObjectID, + item.Key.ObjectID.Format(0), treeName, path), + ID: item.Key.ObjectID, }) } if origItem != nil { -- cgit v1.2.3-2-g168b