示例#1
0
文件: bttree.c 项目: wtaysom/tau
void bt_dump_node (char *label, BtNode_s *node)
{
	printf("%s %p:::%s %d:::\n",
		label, node, pr_is_leaf(node), node->num);
	if (node->is_leaf) {
		dump_leaf(node);
	} else {
		dump_branch(node);
	}
}
示例#2
0
文件: mtree.c 项目: wtaysom/tau
void dump_node (
	tree_s	*tree,
	void	*node,
	unint	depth)
{
	head_s	*h = node;

	printf("node=%p\n", node);
	switch (h->h_magic) {
	case LEAF:	dump_leaf(tree, (leaf_s *)h, depth);
			break;
	case BRANCH:	dump_branch(tree, (branch_s *)h, depth);
			break;
	default:	prmem("Unknown block magic", h, PAGE_SIZE);
			break;
	}
}
示例#3
0
文件: btree.c 项目: taysom/tau
void dump_block (
	tree_s	*tree,
	u64	blkno,
	unint	indent)
{
	void	*data;

//FN;
	data = bget(tree->t_dev, blkno);
	if (!data) return;

	switch (type(data)) {
	case LEAF:	dump_leaf(tree, data, indent);
			break;
	case BRANCH:	dump_branch(tree, data, indent);
			break;
	default:	prmem("Unknown block type", data, BLK_SIZE);
			break;
	}
	bput(data);
}
示例#4
0
static void dump_node (
	tree_s	*tree,
	u64	blknum,
	unint	depth)
{
	head_s	*h;

	h = tau_bget(tree_inode(tree), blknum);
	if (!h) return;

	dprintk("blknum=%llx\n", tau_bnum(h));
	switch (h->h_magic) {
	case LEAF:	dump_leaf(tree, (leaf_s *)h, depth);
			break;
	case BRANCH:	dump_branch(tree, (branch_s *)h, depth);
			break;
	default:	tau_prmem("Unknown block magic", h, BLK_SIZE);
			break;
	}
	tau_bput(h);
}