Adding upstream version 1:10.0.2+ds.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
This commit is contained in:
parent
bf2768bd0f
commit
ea34ddeea6
37998 changed files with 9510514 additions and 0 deletions
26
roms/u-boot/fs/btrfs/dev.c
Normal file
26
roms/u-boot/fs/btrfs/dev.c
Normal file
|
@ -0,0 +1,26 @@
|
|||
// 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 <blk.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);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue