diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2022-06-12 00:29:13 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2022-06-12 00:29:13 -0600 |
commit | 48a0289cd33314a3fa652f5eb1c8695e9f25fd6a (patch) | |
tree | 8508296ecbd0de2e2c3b484669b14bb6b3040609 /cmd/btrfs-fsck/pass1.go | |
parent | 515dfcbef2002aacf49b92aa16843eb8d7232db3 (diff) |
Have WalkTree include path information
Diffstat (limited to 'cmd/btrfs-fsck/pass1.go')
-rw-r--r-- | cmd/btrfs-fsck/pass1.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/btrfs-fsck/pass1.go b/cmd/btrfs-fsck/pass1.go index 37fca0c..bd2b6d9 100644 --- a/cmd/btrfs-fsck/pass1.go +++ b/cmd/btrfs-fsck/pass1.go @@ -25,8 +25,9 @@ func pass1(fs *btrfs.FS, superblock *util.Ref[btrfs.PhysicalAddr, btrfs.Superblo fmt.Printf("Pass 1: ... walking chunk tree\n") visitedChunkNodes := make(map[btrfs.LogicalAddr]struct{}) if err := fs.WalkTree(superblock.Data.ChunkTree, btrfs.WalkTreeHandler{ - Node: func(node *util.Ref[btrfs.LogicalAddr, btrfs.Node], err error) error { + Node: func(path btrfs.WalkTreePath, node *util.Ref[btrfs.LogicalAddr, btrfs.Node], err error) error { if err != nil { + err = fmt.Errorf("%v: %w", path, err) fmt.Printf("Pass 1: ... walk chunk tree: error: %v\n", err) } if node != nil { |