From d250398e68fae70bd765a7f90389b58a4eeb4ee2 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 12 Jul 2022 19:34:42 -0600 Subject: check for bad items Big indentation change in print_tree.go; small actual change. --- cmd/btrfs-rec/inspect_lstrees.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cmd/btrfs-rec') diff --git a/cmd/btrfs-rec/inspect_lstrees.go b/cmd/btrfs-rec/inspect_lstrees.go index b55acf0..0a98369 100644 --- a/cmd/btrfs-rec/inspect_lstrees.go +++ b/cmd/btrfs-rec/inspect_lstrees.go @@ -44,6 +44,11 @@ func init() { treeItemCnt[typ] = treeItemCnt[typ] + 1 return nil }, + BadItem: func(_ btrfs.TreePath, item btrfs.Item) error { + typ := item.Key.ItemType + treeItemCnt[typ] = treeItemCnt[typ] + 1 + return nil + }, }, PostTree: func(_ string, _ btrfs.ObjID) { totalItems := 0 -- cgit v1.2.3-2-g168b