u-boot-brain/fs/reiserfs/dev.c
Marek Behún 5994e8b643 fs: Create a common fs_devread for ext4/reiserfs/zfs
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>
2017-10-02 21:51:50 -04:00

30 lines
635 B
C

/*
* (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 <reiserfs.h>
#include <fs_internal.h>
#include "reiserfs_private.h"
static struct blk_desc *reiserfs_blk_desc;
static disk_partition_t *part_info;
void reiserfs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info)
{
reiserfs_blk_desc = rbdd;
part_info = info;
}
int reiserfs_devread(int sector, int byte_offset, int byte_len, char *buf)
{
return fs_devread(reiserfs_blk_desc, part_info, sector, byte_offset,
byte_len, buf);
}