diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-04-11 13:57:55 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-04-11 13:57:55 -0400 |
commit | d23ea8706c91d5a625454de67c9700dfa688d8b5 (patch) | |
tree | 6498384895e38e612dad4a720674542b7859c8ad /print-tree.c | |
parent | 6d9ce71c8162d7cc940f38d06c15b4e3e3552d8d (diff) | |
download | btrfs-progs-d23ea8706c91d5a625454de67c9700dfa688d8b5.tar.gz |
early support for multiple devices
Diffstat (limited to 'print-tree.c')
-rw-r--r-- | print-tree.c | 8 |
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)); |