diff options
author | David Sterba <dsterba@suse.com> | 2016-05-03 16:20:52 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-05-11 15:53:16 +0200 |
commit | 1e4abbdf96cae7cbf17a3bf1376d7a56e78153fa (patch) | |
tree | b5a669c481040709224fced8b9977632aa882c98 /uuid-tree.c | |
parent | 64a4800875956162b8dec799ac70e89cd7502ce8 (diff) |
btrfs-progs: use ioctl search headers everywhere
Generated by following semantic patch and manually tweaked.
<SmPL>
@@
struct btrfs_ioctl_search_header *SH;
@@
(
- SH->objectid
+ btrfs_search_header_objectid(SH)
|
- SH->offset
+ btrfs_search_header_offset(SH)
|
- SH->transid
+ btrfs_search_header_transid(SH)
|
- SH->len
+ btrfs_search_header_len(SH)
|
- SH->type
+ btrfs_search_header_type(SH)
)
</SmPL>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=112131
Reported-and-tested-by: Anatoly Pugachev <matorola@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'uuid-tree.c')
-rw-r--r-- | uuid-tree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/uuid-tree.c b/uuid-tree.c index 39c3f3fd..8d0b9173 100644 --- a/uuid-tree.c +++ b/uuid-tree.c @@ -72,7 +72,7 @@ static int btrfs_uuid_tree_lookup_any(int fd, const u8 *uuid, u8 type, goto out; } search_header = (struct btrfs_ioctl_search_header *)(search_arg.buf); - item_size = search_header->len; + item_size = btrfs_search_header_len(search_header); if ((item_size & (sizeof(u64) - 1)) || item_size == 0) { printf("btrfs: uuid item with illegal size %lu!\n", (unsigned long)item_size); |