summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-11-01 13:40:19 +0100
committerDavid Sterba <dsterba@suse.com>2016-11-09 13:47:30 +0100
commite905d055f633f0fa2fd402e26c68d8dee7540e00 (patch)
treeee5c7859ad269fc2864a5c6b2966618d433a47b3
parent6122cb32c6035b745a0495b970cb9a75ac0da0d8 (diff)
btrfs-progs: print-tree: extract offset from the item key
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r--print-tree.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/print-tree.c b/print-tree.c
index efaf6fb9..a7dd35a4 100644
--- a/print-tree.c
+++ b/print-tree.c
@@ -997,6 +997,7 @@ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l)
u32 nr = btrfs_header_nritems(l);
u64 objectid;
u32 type;
+ u64 offset;
char flags_str[256];
char uuid_str[BTRFS_UUID_UNPARSED_SIZE];
u8 uuid[BTRFS_UUID_SIZE];
@@ -1013,6 +1014,7 @@ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l)
btrfs_item_key(l, &disk_key, i);
objectid = btrfs_disk_key_objectid(&disk_key);
type = btrfs_disk_key_type(&disk_key);
+ offset = btrfs_disk_key_offset(&disk_key);
printf("\titem %d ", i);
btrfs_print_key(&disk_key);
printf(" itemoff %d itemsize %d\n",