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