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