blob: 7b786e4ed359f84bb55cbf5781a252e4d9c605eb [file] [log] [blame]
wdenk518e2e12004-03-25 14:59:05 +00001/*
2 * (C) Copyright 2003 - 2004
3 * Sysgo AG, <www.elinos.com>, Pavel Bartusek <pba@sysgo.com>
4 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
wdenk518e2e12004-03-25 14:59:05 +00006 */
7
8
9#include <common.h>
wdenk518e2e12004-03-25 14:59:05 +000010#include <config.h>
11#include <reiserfs.h>
Marek Behún5994e8b2017-09-03 17:00:24 +020012#include <fs_internal.h>
wdenk518e2e12004-03-25 14:59:05 +000013#include "reiserfs_private.h"
14
Simon Glass4101f682016-02-29 15:25:34 -070015static struct blk_desc *reiserfs_blk_desc;
Rob Herring650f3662012-08-23 11:31:50 +000016static disk_partition_t *part_info;
wdenk518e2e12004-03-25 14:59:05 +000017
18
Simon Glass4101f682016-02-29 15:25:34 -070019void reiserfs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info)
wdenk518e2e12004-03-25 14:59:05 +000020{
Simon Glass4101f682016-02-29 15:25:34 -070021 reiserfs_blk_desc = rbdd;
Rob Herring650f3662012-08-23 11:31:50 +000022 part_info = info;
wdenk518e2e12004-03-25 14:59:05 +000023}
24
Marek Behún5994e8b2017-09-03 17:00:24 +020025int reiserfs_devread(int sector, int byte_offset, int byte_len, char *buf)
wdenk518e2e12004-03-25 14:59:05 +000026{
Marek Behún5994e8b2017-09-03 17:00:24 +020027 return fs_devread(reiserfs_blk_desc, part_info, sector, byte_offset,
28 byte_len, buf);
wdenk518e2e12004-03-25 14:59:05 +000029}