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