blob: d9f36efc3dd19ea505ad2976e27abcf4973620fa [file] [log] [blame]
Chris Masonfec577f2007-02-26 10:40:21 -05001#include <stdio.h>
2#include <stdlib.h>
3#include "kerncompat.h"
4#include "radix-tree.h"
5#include "ctree.h"
6#include "disk-io.h"
7#include "print-tree.h"
Chris Masone089f052007-03-16 16:20:31 -04008#include "transaction.h"
Chris Masonfec577f2007-02-26 10:40:21 -05009
Chris Masonaf86d072007-02-28 09:40:58 -050010int main(int ac, char **av) {
Chris Mason234b63a2007-03-13 10:46:10 -040011 struct btrfs_super_block super;
12 struct btrfs_root *root;
Chris Masonfec577f2007-02-26 10:40:21 -050013 radix_tree_init();
14 root = open_ctree("dbfile", &super);
Chris Mason3768f362007-03-13 16:47:54 -040015 printf("fs tree\n");
Chris Mason234b63a2007-03-13 10:46:10 -040016 btrfs_print_tree(root, root->node);
Chris Masonfec577f2007-02-26 10:40:21 -050017 printf("map tree\n");
Chris Mason9f5fae22007-03-20 14:38:32 -040018 btrfs_print_tree(root->fs_info->extent_root,
19 root->fs_info->extent_root->node);
20 printf("inode tree\n");
21 btrfs_print_tree(root->fs_info->inode_root,
22 root->fs_info->inode_root->node);
Chris Mason3768f362007-03-13 16:47:54 -040023 printf("root tree\n");
Chris Mason9f5fae22007-03-20 14:38:32 -040024 btrfs_print_tree(root->fs_info->tree_root,
25 root->fs_info->tree_root->node);
Chris Masonfec577f2007-02-26 10:40:21 -050026 return 0;
27}