u-boot/fs/btrfs/dev.c
Simon Glass 0528979fa7 part: Drop disk_partition_t typedef
We should not be using typedefs and these make it harder to use
forward declarations (to reduce header file inclusions). Drop the typedef.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18 17:33:33 -04:00

25 lines
572 B
C

// SPDX-License-Identifier: GPL-2.0+
/*
* BTRFS filesystem implementation for U-Boot
*
* 2017 Marek Behun, CZ.NIC, marek.behun@nic.cz
*/
#include <common.h>
#include <compiler.h>
#include <fs_internal.h>
struct blk_desc *btrfs_blk_desc;
struct disk_partition *btrfs_part_info;
int btrfs_devread(u64 address, int byte_len, void *buf)
{
lbaint_t sector;
int byte_offset;
sector = address >> btrfs_blk_desc->log2blksz;
byte_offset = address % btrfs_blk_desc->blksz;
return fs_devread(btrfs_blk_desc, btrfs_part_info, sector, byte_offset,
byte_len, buf);
}