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); } }
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; } }
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); }
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); }