]> Git Repo - J-u-boot.git/blame - fs/btrfs/dev.c
common: Drop part.h from common header
[J-u-boot.git] / fs / btrfs / dev.c
CommitLineData
83d290c5 1// SPDX-License-Identifier: GPL-2.0+
21a14fac
MB
2/*
3 * BTRFS filesystem implementation for U-Boot
4 *
5 * 2017 Marek Behun, CZ.NIC, [email protected]
21a14fac
MB
6 */
7
8#include <common.h>
e6f6f9e6 9#include <blk.h>
21a14fac
MB
10#include <compiler.h>
11#include <fs_internal.h>
12
13struct blk_desc *btrfs_blk_desc;
0528979f 14struct disk_partition *btrfs_part_info;
21a14fac
MB
15
16int btrfs_devread(u64 address, int byte_len, void *buf)
17{
18 lbaint_t sector;
19 int byte_offset;
20
21 sector = address >> btrfs_blk_desc->log2blksz;
22 byte_offset = address % btrfs_blk_desc->blksz;
23
24 return fs_devread(btrfs_blk_desc, btrfs_part_info, sector, byte_offset,
25 byte_len, buf);
26}
This page took 0.120131 seconds and 4 git commands to generate.