mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-01 17:10:11 +00:00
5994e8b643
The ext4, reiserfs and zfs filesystems all have their own implementation of the same function, *_devread. Generalize this function into fs_devread and put the code into fs/fs_internal.c. Signed-off-by: Marek Behun <marek.behun@nic.cz> [trini: Move fs/fs_internal.o hunk to the end of fs/Makefile as all cases need it] Signed-off-by: Tom Rini <trini@konsulko.com>
31 lines
636 B
C
31 lines
636 B
C
/*
|
|
*
|
|
* based on code of fs/reiserfs/dev.c by
|
|
*
|
|
* (C) Copyright 2003 - 2004
|
|
* Sysgo AG, <www.elinos.com>, Pavel Bartusek <pba@sysgo.com>
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
*/
|
|
|
|
|
|
#include <common.h>
|
|
#include <config.h>
|
|
#include <fs_internal.h>
|
|
#include <zfs_common.h>
|
|
|
|
static struct blk_desc *zfs_blk_desc;
|
|
static disk_partition_t *part_info;
|
|
|
|
void zfs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info)
|
|
{
|
|
zfs_blk_desc = rbdd;
|
|
part_info = info;
|
|
}
|
|
|
|
/* err */
|
|
int zfs_devread(int sector, int byte_offset, int byte_len, char *buf)
|
|
{
|
|
return fs_devread(zfs_blk_desc, part_info, sector, byte_offset,
|
|
byte_len, buf);
|
|
}
|