static void pr_node (BtNode_s *node, int indent) { if (!node) return; pr_indent(indent); printf("%p %s %d\n", node, pr_is_leaf(node), node->num); if (node->is_leaf) { pr_leaf(node, indent + 1); } else { pr_branch(node, indent + 1); } }
static void pr_block(struct mtree *mt, u64 blknum, int indent) { struct block *b; eaver(blknum); b = get_blk(mt->dev, blknum); if (isLeaf(b)) pr_leaf(b->buf, indent+1); else pr_branch(mt, b->buf, indent+1); put_blk(b); }