diff options
author | Misono, Tomohiro <misono.tomohiro@jp.fujitsu.com> | 2018-03-23 17:20:07 +0900 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-03-30 22:15:55 +0200 |
commit | c074434fb5f0874dcf8523191359976b668527f8 (patch) | |
tree | bd35797b19c61dca86fa2e3d2696bc6e77a8d9ec /image/main.c | |
parent | dcb174ce2e2c9be1eaad73757d0312246560ba3d (diff) |
btrfs-progs: remove BTRFS_CRC32_SIZE definition
The kernel code no longer has BTRFS_CRC32_SIZE and only uses
btrfs_csum_sizes[]. So, update the progs code as well.
Suggested-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Tomohiro Misono <misono.tomohiro@jp.fujitsu.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'image/main.c')
-rw-r--r-- | image/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/image/main.c b/image/main.c index 9c75c8b4..5f155c23 100644 --- a/image/main.c +++ b/image/main.c @@ -119,11 +119,11 @@ static struct extent_buffer *alloc_dummy_eb(u64 bytenr, u32 size); static void csum_block(u8 *buf, size_t len) { - u8 result[BTRFS_CRC32_SIZE]; + u8 result[btrfs_csum_sizes[BTRFS_CSUM_TYPE_CRC32]]; u32 crc = ~(u32)0; crc = crc32c(crc, buf + BTRFS_CSUM_SIZE, len - BTRFS_CSUM_SIZE); btrfs_csum_final(crc, result); - memcpy(buf, result, BTRFS_CRC32_SIZE); + memcpy(buf, result, btrfs_csum_sizes[BTRFS_CSUM_TYPE_CRC32]); } static int has_name(struct btrfs_key *key) |