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