mirror of
				https://source.denx.de/u-boot/u-boot.git
				synced 2025-11-04 02:11:25 +01:00 
			
		
		
		
	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>
		
			
				
	
	
		
			30 lines
		
	
	
		
			635 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			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);
 | 
						|
}
 |