diff options
author | Zach Brown <zab@redhat.com> | 2013-08-14 16:16:39 -0700 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2013-09-03 19:41:06 +0200 |
commit | 73043664dc8a48d329881632d33dd9eae6bd060a (patch) | |
tree | 24e6877169489f1e59e9afc62c39c83603862d73 /print-tree.c | |
parent | 47c072c2d85a786c5290e0bc5d2e3110bc806ca1 (diff) |
btrfs-progs: fix in-place byte swapping
Storing fixed-endian values in native cpu types defeats the purpose of
using sparse endian types to find endian conversion bugs.
Signed-off-by: Zach Brown <zab@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'print-tree.c')
-rw-r--r-- | print-tree.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/print-tree.c b/print-tree.c index 761448d1..913b1bb3 100644 --- a/print-tree.c +++ b/print-tree.c @@ -688,11 +688,11 @@ static void print_uuid_item(struct extent_buffer *l, unsigned long offset, return; } while (item_size) { - u64 subvol_id; + __le64 subvol_id; read_extent_buffer(l, &subvol_id, offset, sizeof(u64)); - subvol_id = le64_to_cpu(subvol_id); - printf("\t\tsubvol_id %llu\n", (unsigned long long)subvol_id); + printf("\t\tsubvol_id %llu\n", + (unsigned long long)le64_to_cpu(subvol_id)); item_size -= sizeof(u64); offset += sizeof(u64); } |