blob: c6b67795df5c44f93770064f9d8c7cc2551ce8e1 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
wdenk518e2e12004-03-25 14:59:05 +00002/*
3 * (C) Copyright 2003 - 2004
4 * Sysgo AG, <www.elinos.com>, Pavel Bartusek <pba@sysgo.com>
wdenk518e2e12004-03-25 14:59:05 +00005 */
6
7
8#include <common.h>
wdenk518e2e12004-03-25 14:59:05 +00009#include <config.h>
10#include <reiserfs.h>
Marek Behún5994e8b2017-09-03 17:00:24 +020011#include <fs_internal.h>
wdenk518e2e12004-03-25 14:59:05 +000012#include "reiserfs_private.h"
13
Simon Glass4101f682016-02-29 15:25:34 -070014static struct blk_desc *reiserfs_blk_desc;
Rob Herring650f3662012-08-23 11:31:50 +000015static disk_partition_t *part_info;
wdenk518e2e12004-03-25 14:59:05 +000016
17
Simon Glass4101f682016-02-29 15:25:34 -070018void reiserfs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info)
wdenk518e2e12004-03-25 14:59:05 +000019{
Simon Glass4101f682016-02-29 15:25:34 -070020 reiserfs_blk_desc = rbdd;
Rob Herring650f3662012-08-23 11:31:50 +000021 part_info = info;
wdenk518e2e12004-03-25 14:59:05 +000022}
23
Marek Behún5994e8b2017-09-03 17:00:24 +020024int reiserfs_devread(int sector, int byte_offset, int byte_len, char *buf)
wdenk518e2e12004-03-25 14:59:05 +000025{
Marek Behún5994e8b2017-09-03 17:00:24 +020026 return fs_devread(reiserfs_blk_desc, part_info, sector, byte_offset,
27 byte_len, buf);
wdenk518e2e12004-03-25 14:59:05 +000028}