Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
wdenk | 518e2e1 | 2004-03-25 14:59:05 +0000 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2003 - 2004 |
| 4 | * Sysgo AG, <www.elinos.com>, Pavel Bartusek <pba@sysgo.com> |
wdenk | 518e2e1 | 2004-03-25 14:59:05 +0000 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | |
| 8 | #include <common.h> |
wdenk | 518e2e1 | 2004-03-25 14:59:05 +0000 | [diff] [blame] | 9 | #include <config.h> |
| 10 | #include <reiserfs.h> |
Marek Behún | 5994e8b | 2017-09-03 17:00:24 +0200 | [diff] [blame] | 11 | #include <fs_internal.h> |
wdenk | 518e2e1 | 2004-03-25 14:59:05 +0000 | [diff] [blame] | 12 | #include "reiserfs_private.h" |
| 13 | |
Simon Glass | 4101f68 | 2016-02-29 15:25:34 -0700 | [diff] [blame] | 14 | static struct blk_desc *reiserfs_blk_desc; |
Rob Herring | 650f366 | 2012-08-23 11:31:50 +0000 | [diff] [blame] | 15 | static disk_partition_t *part_info; |
wdenk | 518e2e1 | 2004-03-25 14:59:05 +0000 | [diff] [blame] | 16 | |
| 17 | |
Simon Glass | 4101f68 | 2016-02-29 15:25:34 -0700 | [diff] [blame] | 18 | void reiserfs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info) |
wdenk | 518e2e1 | 2004-03-25 14:59:05 +0000 | [diff] [blame] | 19 | { |
Simon Glass | 4101f68 | 2016-02-29 15:25:34 -0700 | [diff] [blame] | 20 | reiserfs_blk_desc = rbdd; |
Rob Herring | 650f366 | 2012-08-23 11:31:50 +0000 | [diff] [blame] | 21 | part_info = info; |
wdenk | 518e2e1 | 2004-03-25 14:59:05 +0000 | [diff] [blame] | 22 | } |
| 23 | |
Marek Behún | 5994e8b | 2017-09-03 17:00:24 +0200 | [diff] [blame] | 24 | int reiserfs_devread(int sector, int byte_offset, int byte_len, char *buf) |
wdenk | 518e2e1 | 2004-03-25 14:59:05 +0000 | [diff] [blame] | 25 | { |
Marek Behún | 5994e8b | 2017-09-03 17:00:24 +0200 | [diff] [blame] | 26 | return fs_devread(reiserfs_blk_desc, part_info, sector, byte_offset, |
| 27 | byte_len, buf); |
wdenk | 518e2e1 | 2004-03-25 14:59:05 +0000 | [diff] [blame] | 28 | } |