btrfs-progs: print-tree: rename item callbacks to match the key name
authorDavid Sterba <dsterba@suse.com>
Thu, 31 Aug 2017 14:34:15 +0000 (16:34 +0200)
committerDavid Sterba <dsterba@suse.com>
Fri, 8 Sep 2017 14:15:05 +0000 (16:15 +0200)
Signed-off-by: David Sterba <dsterba@suse.com>
cmds-inspect-dump-super.c
print-tree.c
print-tree.h

index 3b9e85e..0919095 100644 (file)
@@ -118,7 +118,7 @@ static void print_sys_chunk_array(struct btrfs_super_block *sb)
                        len = btrfs_chunk_item_size(num_stripes);
                        if (cur_offset + len > array_size)
                                goto out_short_read;
-                       print_chunk(buf, chunk);
+                       print_chunk_item(buf, chunk);
                } else {
                        error("unexpected item type %u in sys_array at offset %u",
                                (u32)key.type, cur_offset);
index 4d251b5..41a40fe 100644 (file)
@@ -195,7 +195,7 @@ static void qgroup_flags_to_str(u64 flags, char *ret)
                strcat(ret, "|INCONSISTENT");
 }
 
-void print_chunk(struct extent_buffer *eb, struct btrfs_chunk *chunk)
+void print_chunk_item(struct extent_buffer *eb, struct btrfs_chunk *chunk)
 {
        u16 num_stripes = btrfs_chunk_num_stripes(eb, chunk);
        int i;
@@ -541,7 +541,7 @@ static void root_flags_to_str(u64 flags, char *ret)
                strcat(ret, "none");
 }
 
-static void print_root(struct extent_buffer *leaf, int slot)
+static void print_root_item(struct extent_buffer *leaf, int slot)
 {
        struct btrfs_root_item *ri;
        struct btrfs_root_item root_item;
@@ -1054,7 +1054,7 @@ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *eb)
                        printf("\t\torphan item\n");
                        break;
                case BTRFS_ROOT_ITEM_KEY:
-                       print_root(eb, i);
+                       print_root_item(eb, i);
                        break;
                case BTRFS_ROOT_REF_KEY:
                        print_root_ref(eb, i, "ref");
@@ -1139,7 +1139,7 @@ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *eb)
                        printf("\t\tfree space bitmap\n");
                        break;
                case BTRFS_CHUNK_ITEM_KEY:
-                       print_chunk(eb, ptr);
+                       print_chunk_item(eb, ptr);
                        break;
                case BTRFS_DEV_ITEM_KEY:
                        print_dev_item(eb, ptr);
index 9865500..df58b84 100644 (file)
@@ -22,7 +22,7 @@
 void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l);
 void btrfs_print_tree(struct btrfs_root *root, struct extent_buffer *t, int follow);
 void btrfs_print_key(struct btrfs_disk_key *disk_key);
-void print_chunk(struct extent_buffer *eb, struct btrfs_chunk *chunk);
+void print_chunk_item(struct extent_buffer *eb, struct btrfs_chunk *chunk);
 void print_extent_item(struct extent_buffer *eb, int slot, int metadata);
 void print_objectid(FILE *stream, u64 objectid, u8 type);
 void print_key_type(FILE *stream, u64 objectid, u8 type);