Exemple #1
0
void pr_bucket (bucket_s *b, unint depth)
{
	switch (b->b_type) {
	case EMPTY:	pr_empty(depth);		return;
	case NODE:	pr_node(b->b_node, depth);	return;
	case LEAF:	pr_leaf(b->b_num, depth);	return;
	}
}
Exemple #2
0
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);
	}
}
Exemple #3
0
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);
}