libbtrfsutil: fix test assumptions about top-level subvolume
[platform/upstream/btrfs-progs.git] / btrfs-map-logical.c
index d752cf6..7a8bcff 100644 (file)
@@ -169,7 +169,7 @@ static int write_extent_content(struct btrfs_fs_info *fs_info, int out_fd,
 
        while (cur_offset < length) {
                cur_len = min_t(u64, length - cur_offset, BUFFER_SIZE);
-               ret = read_extent_data(fs_info->tree_root, buffer,
+               ret = read_extent_data(fs_info, buffer,
                                       logical + cur_offset, &cur_len, mirror);
                if (ret < 0) {
                        fprintf(stderr,
@@ -190,7 +190,7 @@ static int write_extent_content(struct btrfs_fs_info *fs_info, int out_fd,
        return ret;
 }
 
-static void print_usage(void) __attribute__((noreturn));
+__attribute__((noreturn))
 static void print_usage(void)
 {
        printf("usage: btrfs-map-logical [options] device\n");