btrfs-progs/debug-tree.c

23 lines
565 B
C
Raw Normal View History

#include <stdio.h>
#include <stdlib.h>
#include "kerncompat.h"
#include "radix-tree.h"
#include "ctree.h"
#include "disk-io.h"
#include "print-tree.h"
2007-03-16 20:20:31 +00:00
#include "transaction.h"
2007-02-28 14:40:58 +00:00
int main(int ac, char **av) {
2007-03-13 14:46:10 +00:00
struct btrfs_super_block super;
struct btrfs_root *root;
radix_tree_init();
root = open_ctree("dbfile", &super);
printf("fs tree\n");
2007-03-13 14:46:10 +00:00
btrfs_print_tree(root, root->node);
printf("map tree\n");
2007-03-13 14:46:10 +00:00
btrfs_print_tree(root->extent_root, root->extent_root->node);
printf("root tree\n");
btrfs_print_tree(root->tree_root, root->tree_root->node);
return 0;
}