summaryrefslogtreecommitdiff
path: root/cmds-fi-usage.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-05-03 16:20:52 +0200
committerDavid Sterba <dsterba@suse.com>2016-05-11 15:53:16 +0200
commit1e4abbdf96cae7cbf17a3bf1376d7a56e78153fa (patch)
treeb5a669c481040709224fced8b9977632aa882c98 /cmds-fi-usage.c
parent64a4800875956162b8dec799ac70e89cd7502ce8 (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 'cmds-fi-usage.c')
-rw-r--r--cmds-fi-usage.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmds-fi-usage.c b/cmds-fi-usage.c
index 33bf403a..32000ea0 100644
--- a/cmds-fi-usage.c
+++ b/cmds-fi-usage.c
@@ -185,11 +185,11 @@ static int load_chunk_info(int fd, struct chunk_info **info_ptr, int *info_count
return 1;
}
- off += sh->len;
+ off += btrfs_search_header_len(sh);
- sk->min_objectid = sh->objectid;
- sk->min_type = sh->type;
- sk->min_offset = sh->offset+1;
+ sk->min_objectid = btrfs_search_header_objectid(sh);
+ sk->min_type = btrfs_search_header_type(sh);
+ sk->min_offset = btrfs_search_header_offset(sh)+1;
}
if (!sk->min_offset) /* overflow */