So when searching for BTRFS_DEV_ITEMS_OBJECTID, it hits, albeit it is
defined same as BTRFS_ROOT_TREE_OBJECTID.
Signed-off-by: Anand Jain <anand.jain@xxxxxxxxxx>
---
v1->v2: Improve comment.
print-tree.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/print-tree.c b/print-tree.c
index b31e515f8989..b1c59d776547 100644
--- a/print-tree.c
+++ b/print-tree.c
@@ -705,6 +705,11 @@ void print_objectid(FILE *stream, u64 objectid, u8 type)
switch (objectid) {
case BTRFS_ROOT_TREE_OBJECTID:
+ /*
+ * BTRFS_ROOT_TREE_OBJECTID and BTRFS_DEV_ITEMS_OBJECTID are
+ * defined with the same value of 1ULL, distinguish them by
+ * checking the type.
+ */
if (type == BTRFS_DEV_ITEM_KEY)
fprintf(stream, "DEV_ITEMS");
else
--
2.21.0 (Apple Git-120)