]>
Commit | Line | Data |
---|---|---|
83d290c5 | 1 | // SPDX-License-Identifier: GPL-2.0+ |
4d3c95f5 JL |
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 <[email protected]> | |
4d3c95f5 JL |
8 | */ |
9 | ||
10 | ||
11 | #include <common.h> | |
12 | #include <config.h> | |
5994e8b6 | 13 | #include <fs_internal.h> |
4d3c95f5 JL |
14 | #include <zfs_common.h> |
15 | ||
4101f687 | 16 | static struct blk_desc *zfs_blk_desc; |
41204570 | 17 | static disk_partition_t *part_info; |
4d3c95f5 | 18 | |
4101f687 | 19 | void zfs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info) |
4d3c95f5 | 20 | { |
4101f687 | 21 | zfs_blk_desc = rbdd; |
41204570 | 22 | part_info = info; |
4d3c95f5 JL |
23 | } |
24 | ||
25 | /* err */ | |
26 | int zfs_devread(int sector, int byte_offset, int byte_len, char *buf) | |
27 | { | |
5994e8b6 MB |
28 | return fs_devread(zfs_blk_desc, part_info, sector, byte_offset, |
29 | byte_len, buf); | |
4d3c95f5 | 30 | } |