xref: /openbmc/u-boot/fs/reiserfs/dev.c (revision ae07d609)
1 /*
2  *  (C) Copyright 2003 - 2004
3  *  Sysgo AG, <www.elinos.com>, Pavel Bartusek <pba@sysgo.com>
4  *
5  * SPDX-License-Identifier:	GPL-2.0+
6  */
7 
8 
9 #include <common.h>
10 #include <config.h>
11 #include <reiserfs.h>
12 #include <fs_internal.h>
13 #include "reiserfs_private.h"
14 
15 static struct blk_desc *reiserfs_blk_desc;
16 static disk_partition_t *part_info;
17 
18 
19 void reiserfs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info)
20 {
21 	reiserfs_blk_desc = rbdd;
22 	part_info = info;
23 }
24 
25 int reiserfs_devread(int sector, int byte_offset, int byte_len, char *buf)
26 {
27 	return fs_devread(reiserfs_blk_desc, part_info, sector, byte_offset,
28 			  byte_len, buf);
29 }
30