summaryrefslogtreecommitdiff
path: root/print-tree.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-04-11 13:57:55 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-04-11 13:57:55 -0400
commitd23ea8706c91d5a625454de67c9700dfa688d8b5 (patch)
tree6498384895e38e612dad4a720674542b7859c8ad /print-tree.c
parent6d9ce71c8162d7cc940f38d06c15b4e3e3552d8d (diff)
downloadbtrfs-progs-d23ea8706c91d5a625454de67c9700dfa688d8b5.tar.gz
early support for multiple devices
Diffstat (limited to 'print-tree.c')
-rw-r--r--print-tree.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/print-tree.c b/print-tree.c
index 49acb28..eb0c86b 100644
--- a/print-tree.c
+++ b/print-tree.c
@@ -13,6 +13,7 @@ void btrfs_print_leaf(struct btrfs_root *root, struct btrfs_leaf *l)
struct btrfs_extent_item *ei;
struct btrfs_root_item *ri;
struct btrfs_dir_item *di;
+ struct btrfs_device_item *devi;
struct btrfs_inode_item *ii;
struct btrfs_file_extent_item *fi;
char *p;
@@ -85,6 +86,13 @@ void btrfs_print_leaf(struct btrfs_root *root, struct btrfs_leaf *l)
btrfs_file_extent_offset(fi),
btrfs_file_extent_num_blocks(fi));
break;
+ case BTRFS_DEV_ITEM_KEY:
+ devi = btrfs_item_ptr(l, i, struct btrfs_device_item);
+ printf("\t\tdev namelen %u name %.*s\n",
+ btrfs_device_pathlen(devi),
+ btrfs_device_pathlen(devi),
+ (char *)(devi + 1));
+ break;
case BTRFS_STRING_ITEM_KEY:
printf("\t\titem data %.*s\n", btrfs_item_size(item),
btrfs_leaf_data(l) + btrfs_item_offset(item));